recipes/testing.rb in rails_apps_composer-2.2.16 vs recipes/testing.rb in rails_apps_composer-2.2.17
- old
+ new
@@ -249,10 +249,12 @@
# required if the Devise Confirmable module is used
# confirmed_at Time.now
end
RUBY
end
- gsub_file 'features/step_definitions/user_steps.rb', /@user = FactoryGirl.create\(:user, email: @visitor\[:email\]\)/, '@user = Fabricate(:user, email: @visitor[:email])'
+ if prefer :integration, 'cucumber'
+ gsub_file 'features/step_definitions/user_steps.rb', /@user = FactoryGirl.create\(:user, email: @visitor\[:email\]\)/, '@user = Fabricate(:user, email: @visitor[:email])'
+ end
gsub_file 'spec/controllers/users_controller_spec.rb', /@user = FactoryGirl.create\(:user\)/, '@user = Fabricate(:user)'
end
end # after_everything
__END__