Commit f95ac763eea7b3f1c02eee68d92311e6920da175
1 parent
a308ea35
Exists in
master
and in
1 other branch
fix spec/controller/deploy_controller with fabrication_gem
Showing
3 changed files
with
5 additions
and
7 deletions
Show diff stats
spec/controllers/deploys_controller_spec.rb
... | ... | @@ -12,7 +12,7 @@ describe DeploysController do |
12 | 12 | 'scm_revision' => '19d77837eef37902cf5df7e4445c85f392a8d0d5', |
13 | 13 | 'message' => 'johns first deploy' |
14 | 14 | } |
15 | - @app = Factory(:app_with_watcher, :notify_on_deploys => true, :api_key => 'APIKEY') | |
15 | + @app = Fabricate(:app_with_watcher, :notify_on_deploys => true, :api_key => 'APIKEY') | |
16 | 16 | end |
17 | 17 | |
18 | 18 | it 'finds the app via the api key' do |
... | ... | @@ -30,7 +30,7 @@ describe DeploysController do |
30 | 30 | :revision => '19d77837eef37902cf5df7e4445c85f392a8d0d5', |
31 | 31 | :message => 'johns first deploy' |
32 | 32 | |
33 | - }).and_return(Factory(:deploy)) | |
33 | + }).and_return(Fabricate(:deploy)) | |
34 | 34 | post :create, :deploy => @params, :api_key => 'APIKEY' |
35 | 35 | end |
36 | 36 | |
... | ... | @@ -45,8 +45,8 @@ describe DeploysController do |
45 | 45 | |
46 | 46 | context "GET #index" do |
47 | 47 | before(:each) do |
48 | - @deploy = Factory :deploy | |
49 | - sign_in Factory(:admin) | |
48 | + @deploy = Fabricate :deploy | |
49 | + sign_in Fabricate(:admin) | |
50 | 50 | get :index, :app_id => @deploy.app.id |
51 | 51 | end |
52 | 52 | ... | ... |
spec/fabricators/app_fabricator.rb
spec/fabricators/sequences_fabricator.rb