recipes/testing.rb in rails_apps_composer-2.1.7 vs recipes/testing.rb in rails_apps_composer-2.1.8
- old
+ new
@@ -151,17 +151,27 @@
copy_from_repo 'spec/controllers/sessions_controller_spec.rb', :repo => repo
copy_from_repo 'spec/controllers/home_controller_spec.rb', :repo => repo
copy_from_repo 'spec/controllers/users_controller_spec.rb', :repo => repo
copy_from_repo 'spec/models/user_spec.rb', :repo => repo
end
+ ## SUBDOMAINS
+ if (prefer :authentication, 'devise') && (prefer :starter_app, 'subdomains_app')
+ say_wizard "copying RSpec files from the rails3-subdomains examples"
+ repo = 'https://raw.github.com/RailsApps/rails3-subdomains/master/'
+ copy_from_repo 'spec/spec_helper.rb', :repo => repo
+ copy_from_repo 'spec/factories/users.rb', :repo => repo
+ copy_from_repo 'spec/controllers/home_controller_spec.rb', :repo => repo
+ copy_from_repo 'spec/controllers/users_controller_spec.rb', :repo => repo
+ copy_from_repo 'spec/models/user_spec.rb', :repo => repo
+ end
## GIT
git :add => '.' if prefer :git, true
git :commit => "-aqm 'rails_apps_composer: rspec files'" if prefer :git, true
end
### CUCUMBER ###
if prefer :integration, 'cucumber'
- ## CUCUMBER AND DEVISE
+ ## CUCUMBER AND DEVISE (USERS APP)
if (prefer :authentication, 'devise') && (prefer :starter_app, 'users_app')
say_wizard "copying Cucumber scenarios from the rails3-devise-rspec-cucumber examples"
repo = 'https://raw.github.com/RailsApps/rails3-devise-rspec-cucumber/master/'
copy_from_repo 'spec/controllers/home_controller_spec.rb', :repo => repo
copy_from_repo 'features/users/sign_in.feature', :repo => repo
@@ -183,10 +193,11 @@
And I should be signed out
RUBY
end
end
end
+ ## CUCUMBER AND DEVISE (ADMIN APP)
if (prefer :authentication, 'devise') && (prefer :starter_app, 'admin_app')
say_wizard "copying Cucumber scenarios from the rails3-bootstrap-devise-cancan examples"
repo = 'https://raw.github.com/RailsApps/rails3-bootstrap-devise-cancan/master/'
copy_from_repo 'spec/controllers/home_controller_spec.rb', :repo => repo
copy_from_repo 'features/users/sign_in.feature', :repo => repo
@@ -207,9 +218,21 @@
Then I see an unconfirmed account message
And I should be signed out
RUBY
end
end
+ end
+ ## CUCUMBER AND DEVISE (SUBDOMAINS APP)
+ if (prefer :authentication, 'devise') && (prefer :starter_app, 'subdomains_app')
+ say_wizard "copying RSpec files from the rails3-subdomains examples"
+ repo = 'https://raw.github.com/RailsApps/rails3-subdomains/master/'
+ copy_from_repo 'features/users/sign_in.feature', :repo => repo
+ copy_from_repo 'features/users/sign_out.feature', :repo => repo
+ copy_from_repo 'features/users/sign_up.feature', :repo => repo
+ copy_from_repo 'features/users/user_edit.feature', :repo => repo
+ copy_from_repo 'features/users/user_show.feature', :repo => repo
+ copy_from_repo 'features/step_definitions/user_steps.rb', :repo => repo
+ copy_from_repo 'features/support/paths.rb', :repo => repo
end
## GIT
git :add => '.' if prefer :git, true
git :commit => "-aqm 'rails_apps_composer: cucumber files'" if prefer :git, true
end