recipes/testing.rb in rails_apps_composer-2.2.24 vs recipes/testing.rb in rails_apps_composer-2.2.25
- old
+ new
@@ -252,10 +252,12 @@
RUBY
end
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)'
+ if File.exist?('spec/controllers/users_controller_spec.rb')
+ gsub_file 'spec/controllers/users_controller_spec.rb', /@user = FactoryGirl.create\(:user\)/, '@user = Fabricate(:user)'
+ end
end
end # after_everything
__END__