Commit c54c7abf1244960c22edd6f349d771ceda6b59a9

Authored by Ryan Jones
1 parent 5bd3f773
Exists in master and in 1 other branch production

add in fabricators

spec/fabricators/issue_tracker_fabricator.rb
... ... @@ -24,10 +24,3 @@ Fabricator :github_issues_tracker, :from => :issue_tracker, :class_name => "Issu
24 24 project_id 'test_account/test_project'
25 25 username 'test_username'
26 26 end
27   -
28   -Fabricator :campfire_tracker, :from => :issue_tracker, :class_name => "IssueTrackers::CampfireTracker" do
29   - subdomain 'camproomname'
30   - api_token 1234567890
31   - project_id 888555
32   -end
33   -
... ...
spec/fabricators/notification_fabricator.rb
... ... @@ -1,3 +0,0 @@
1   -Fabricator(:notification) do
2   - name "MyString"
3   -end
spec/fabricators/notification_service_fabricator.rb 0 → 100644
... ... @@ -0,0 +1,12 @@
  1 +Fabricator(:notification_service) do
  2 + room_id { sequence :word }
  3 + api_token { sequence :word }
  4 + subdomain { sequence :word }
  5 +end
  6 +
  7 +Fabricator :campfire_notification_service, :from => :notification_service, :class_name => "NotificationService::CampfireService" do
  8 + room_id '123456'
  9 + api_token 'ertj3qh4895oqhfiugs4g74p5w96'
  10 + subdomain 'waffles'
  11 +end
  12 +
... ...
spec/models/issue_trackers/campfire_tracker_spec.rb
... ... @@ -1,21 +0,0 @@
1   -require 'spec_helper'
2   -
3   -describe IssueTrackers::CampfireTracker do
4   - it "should post the error to campfire and display the error" do
5   - # setup fabrications
6   - notice = Fabricate :notice
7   - tracker = Fabricate :campfire_tracker
8   -
9   - # stub out campy methods
10   - campy = mock('CampfireTracker')
11   - Campy::Room.stub(:new).and_return(campy)
12   - campy.stub(:speak) { true }
13   -
14   - # expectations
15   - campy.should_receive(:speak).once.with(/errbit|production|foo#bar/).and_return(true)
16   -
17   - # create the issue
18   - tracker.create_issue(notice.problem)
19   - end
20   -end
21   -
spec/models/notification_spec.rb
... ... @@ -1,5 +0,0 @@
1   -require 'spec_helper'
2   -
3   -describe Notification do
4   - pending "add some examples to (or delete) #{__FILE__}"
5   -end