Commit 0e00ac10c5a7e7751e456fb89b9fdef4090972f2
1 parent
d1bde714
Exists in
master
and in
1 other branch
fix spec/models/issue_trackers with fabrication_gem
Showing
6 changed files
with
14 additions
and
14 deletions
Show diff stats
spec/models/issue_trackers/fogbugz_tracker_spec.rb
... | ... | @@ -2,8 +2,8 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe FogbugzTracker do |
4 | 4 | it "should create an issue on Fogbugz with problem params, and set issue link for problem" do |
5 | - notice = Factory :notice | |
6 | - tracker = Factory :fogbugz_tracker, :app => notice.app | |
5 | + notice = Fabricate :notice | |
6 | + tracker = Fabricate :fogbugz_tracker, :app => notice.app | |
7 | 7 | problem = notice.problem |
8 | 8 | |
9 | 9 | number = 123 | ... | ... |
spec/models/issue_trackers/github_issues_tracker_spec.rb
... | ... | @@ -2,8 +2,8 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe GithubIssuesTracker do |
4 | 4 | it "should create an issue on Github Issues with problem params, and set issue link for problem" do |
5 | - notice = Factory :notice | |
6 | - tracker = Factory :github_issues_tracker, :app => notice.app | |
5 | + notice = Fabricate :notice | |
6 | + tracker = Fabricate :github_issues_tracker, :app => notice.app | |
7 | 7 | problem = notice.problem |
8 | 8 | |
9 | 9 | number = 5 | ... | ... |
spec/models/issue_trackers/lighthouse_tracker_spec.rb
... | ... | @@ -2,8 +2,8 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe LighthouseTracker do |
4 | 4 | it "should create an issue on Lighthouse with problem params, and set issue link for problem" do |
5 | - notice = Factory :notice | |
6 | - tracker = Factory :lighthouse_tracker, :app => notice.app | |
5 | + notice = Fabricate :notice | |
6 | + tracker = Fabricate :lighthouse_tracker, :app => notice.app | |
7 | 7 | problem = notice.problem |
8 | 8 | |
9 | 9 | number = 5 | ... | ... |
spec/models/issue_trackers/mingle_tracker_spec.rb
... | ... | @@ -2,8 +2,8 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe MingleTracker do |
4 | 4 | it "should create an issue on Mingle with problem params, and set issue link for problem" do |
5 | - notice = Factory :notice | |
6 | - tracker = Factory :mingle_tracker, :app => notice.app | |
5 | + notice = Fabricate :notice | |
6 | + tracker = Fabricate :mingle_tracker, :app => notice.app | |
7 | 7 | problem = notice.problem |
8 | 8 | |
9 | 9 | number = 5 | ... | ... |
spec/models/issue_trackers/pivotal_labs_tracker_spec.rb
... | ... | @@ -2,8 +2,8 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe PivotalLabsTracker do |
4 | 4 | it "should create an issue on Pivotal Tracker with problem params, and set issue link for problem" do |
5 | - notice = Factory :notice | |
6 | - tracker = Factory :pivotal_labs_tracker, :app => notice.app, :project_id => 10 | |
5 | + notice = Fabricate :notice | |
6 | + tracker = Fabricate :pivotal_labs_tracker, :app => notice.app, :project_id => 10 | |
7 | 7 | problem = notice.problem |
8 | 8 | |
9 | 9 | story_id = 5 | ... | ... |
spec/models/issue_trackers/redmine_tracker_spec.rb
... | ... | @@ -2,8 +2,8 @@ require 'spec_helper' |
2 | 2 | |
3 | 3 | describe RedmineTracker do |
4 | 4 | it "should create an issue on Redmine with problem params, and set issue link for problem" do |
5 | - notice = Factory(:notice) | |
6 | - tracker = Factory(:redmine_tracker, :app => notice.app, :project_id => 10) | |
5 | + notice = Fabricate(:notice) | |
6 | + tracker = Fabricate(:redmine_tracker, :app => notice.app, :project_id => 10) | |
7 | 7 | problem = notice.problem |
8 | 8 | number = 5 |
9 | 9 | @issue_link = "#{tracker.account}/issues/#{number}.xml?project_id=#{tracker.project_id}" |
... | ... | @@ -24,7 +24,7 @@ describe RedmineTracker do |
24 | 24 | end |
25 | 25 | |
26 | 26 | it "should generate a url where a file with line number can be viewed" do |
27 | - t = Factory(:redmine_tracker, :account => 'http://redmine.example.com', :project_id => "errbit") | |
27 | + t = Fabricate(:redmine_tracker, :account => 'http://redmine.example.com', :project_id => "errbit") | |
28 | 28 | t.url_to_file("/example/file").should == |
29 | 29 | 'http://redmine.example.com/projects/errbit/repository/annotate/example/file' |
30 | 30 | t.url_to_file("/example/file", 25).should == |
... | ... | @@ -32,7 +32,7 @@ describe RedmineTracker do |
32 | 32 | end |
33 | 33 | |
34 | 34 | it "should use the alt_project_id to generate a file/linenumber url, if given" do |
35 | - t = Factory(:redmine_tracker, :account => 'http://redmine.example.com', | |
35 | + t = Fabricate(:redmine_tracker, :account => 'http://redmine.example.com', | |
36 | 36 | :project_id => "errbit", |
37 | 37 | :alt_project_id => "actual_project") |
38 | 38 | t.url_to_file("/example/file", 25).should == | ... | ... |