diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators_test.rb | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index 9c9a4e6016..5579e0f40d 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -165,15 +165,13 @@ class GeneratorsTest < GeneratorsTestCase def test_developer_options_are_overwriten_by_user_options Rails::Generators.options[:new_generator] = { :generate => false } - klass = Class.new(Rails::Generators::Base) do - def self.name - "NewGenerator" + self.class.class_eval <<-end_eval + class NewGenerator < Rails::Generators::Base + class_option :generate, :default => true end + end_eval - class_option :generate, :default => true - end - - assert_equal false, klass.class_options[:generate].default + assert_equal false, NewGenerator.class_options[:generate].default end def test_source_paths_for_not_namespaced_generators |