Skip to content

Commit

Permalink
changes to devise initializer to accomodate Cucumber must come after …
Browse files Browse the repository at this point in the history
…Devise in installed
  • Loading branch information
fortuity committed Jul 9, 2011
1 parent a3af3bb commit a7a1b5b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions recipes/cucumber.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@
if config['cucumber']
if recipes.include? 'devise'
after_bundler do
# Cucumber wants to test GET requests not DELETE requests for destroy_user_session_path
# (see https://github.com/RailsApps/rails3-devise-rspec-cucumber/issues/3)
gsub_file 'config/initializers/devise.rb', 'config.sign_out_via = :delete', 'config.sign_out_via = :get'
say_wizard "Copying Cucumber scenarios from the rails3-devise-rspec-cucumber examples"
begin
# copy all the Cucumber scenario files from the rails3-devise-rspec-cucumber example app
Expand Down
6 changes: 6 additions & 0 deletions recipes/devise.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@
# Prevent logging of password_confirmation
gsub_file 'config/application.rb', /:password/, ':password, :password_confirmation'

if config['cucumber']
# Cucumber wants to test GET requests not DELETE requests for destroy_user_session_path
# (see https://github.com/RailsApps/rails3-devise-rspec-cucumber/issues/3)
gsub_file 'config/initializers/devise.rb', 'config.sign_out_via = :delete', 'config.sign_out_via = :get'
end

end

after_everything do
Expand Down

0 comments on commit a7a1b5b

Please sign in to comment.