diff --git a/features/generators.feature b/features/generators.feature index 6630ebd..dfddd85 100644 --- a/features/generators.feature +++ b/features/generators.feature @@ -24,7 +24,7 @@ Feature: end """ - And the file "test/factories/namespaced_users.rb" should contain "factory :namespaced_user, :class => 'Namespaced::User' do" + And the file "test/factories/namespaced_users.rb" should contain "factory :namespaced_user, class: 'Namespaced::User' do" Scenario: The factory_girl_rails generators does not create a factory file for each model if there is a factories.rb file in the test directory When I run `bundle install` with a clean environment diff --git a/lib/generators/factory_girl.rb b/lib/generators/factory_girl.rb index 3918c36..acbba81 100644 --- a/lib/generators/factory_girl.rb +++ b/lib/generators/factory_girl.rb @@ -8,7 +8,7 @@ module FactoryGirl end def explicit_class_option - ", :class => '#{class_name}'" unless class_name == singular_table_name.camelize + ", class: '#{class_name}'" unless class_name == singular_table_name.camelize end end end