From c54c7abf1244960c22edd6f349d771ceda6b59a9 Mon Sep 17 00:00:00 2001 From: Ryan Jones Date: Tue, 7 Aug 2012 11:24:51 -0600 Subject: [PATCH] add in fabricators --- spec/fabricators/issue_tracker_fabricator.rb | 7 ------- spec/fabricators/notification_fabricator.rb | 3 --- spec/fabricators/notification_service_fabricator.rb | 12 ++++++++++++ spec/models/issue_trackers/campfire_tracker_spec.rb | 21 --------------------- spec/models/notification_spec.rb | 5 ----- 5 files changed, 12 insertions(+), 36 deletions(-) delete mode 100644 spec/fabricators/notification_fabricator.rb create mode 100644 spec/fabricators/notification_service_fabricator.rb delete mode 100644 spec/models/issue_trackers/campfire_tracker_spec.rb delete mode 100644 spec/models/notification_spec.rb diff --git a/spec/fabricators/issue_tracker_fabricator.rb b/spec/fabricators/issue_tracker_fabricator.rb index ffefa0d..719738f 100644 --- a/spec/fabricators/issue_tracker_fabricator.rb +++ b/spec/fabricators/issue_tracker_fabricator.rb @@ -24,10 +24,3 @@ Fabricator :github_issues_tracker, :from => :issue_tracker, :class_name => "Issu project_id 'test_account/test_project' username 'test_username' end - -Fabricator :campfire_tracker, :from => :issue_tracker, :class_name => "IssueTrackers::CampfireTracker" do - subdomain 'camproomname' - api_token 1234567890 - project_id 888555 -end - diff --git a/spec/fabricators/notification_fabricator.rb b/spec/fabricators/notification_fabricator.rb deleted file mode 100644 index b855c21..0000000 --- a/spec/fabricators/notification_fabricator.rb +++ /dev/null @@ -1,3 +0,0 @@ -Fabricator(:notification) do - name "MyString" -end diff --git a/spec/fabricators/notification_service_fabricator.rb b/spec/fabricators/notification_service_fabricator.rb new file mode 100644 index 0000000..bca8adb --- /dev/null +++ b/spec/fabricators/notification_service_fabricator.rb @@ -0,0 +1,12 @@ +Fabricator(:notification_service) do + room_id { sequence :word } + api_token { sequence :word } + subdomain { sequence :word } +end + +Fabricator :campfire_notification_service, :from => :notification_service, :class_name => "NotificationService::CampfireService" do + room_id '123456' + api_token 'ertj3qh4895oqhfiugs4g74p5w96' + subdomain 'waffles' +end + diff --git a/spec/models/issue_trackers/campfire_tracker_spec.rb b/spec/models/issue_trackers/campfire_tracker_spec.rb deleted file mode 100644 index 2808e4c..0000000 --- a/spec/models/issue_trackers/campfire_tracker_spec.rb +++ /dev/null @@ -1,21 +0,0 @@ -require 'spec_helper' - -describe IssueTrackers::CampfireTracker do - it "should post the error to campfire and display the error" do - # setup fabrications - notice = Fabricate :notice - tracker = Fabricate :campfire_tracker - - # stub out campy methods - campy = mock('CampfireTracker') - Campy::Room.stub(:new).and_return(campy) - campy.stub(:speak) { true } - - # expectations - campy.should_receive(:speak).once.with(/errbit|production|foo#bar/).and_return(true) - - # create the issue - tracker.create_issue(notice.problem) - end -end - diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb deleted file mode 100644 index 2fc117a..0000000 --- a/spec/models/notification_spec.rb +++ /dev/null @@ -1,5 +0,0 @@ -require 'spec_helper' - -describe Notification do - pending "add some examples to (or delete) #{__FILE__}" -end -- libgit2 0.21.2