diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-25 10:46:29 -0800 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-02-25 10:46:29 -0800 |
commit | c7f9e8c06cb60aef33cf0a03cb3c1b927eb8c1cf (patch) | |
tree | 9a2faf778755ba2dfd75e945f099aaaa0d94695b /railties | |
parent | 45ceacd6ded0d3fc4c567c17cc45c6979c34cc2a (diff) | |
download | rails-c7f9e8c06cb60aef33cf0a03cb3c1b927eb8c1cf.tar.gz rails-c7f9e8c06cb60aef33cf0a03cb3c1b927eb8c1cf.tar.bz2 rails-c7f9e8c06cb60aef33cf0a03cb3c1b927eb8c1cf.zip |
Fix test on 1.8.8. Broken by inherited hook now running before Class.new block.
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators_test.rb | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/railties/test/generators_test.rb b/railties/test/generators_test.rb index 33cc27bd84..844497c8e3 100644 --- a/railties/test/generators_test.rb +++ b/railties/test/generators_test.rb @@ -147,12 +147,13 @@ class GeneratorsTest < Rails::Generators::TestCase 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' end - class_option :generate, :default => true - end + self.class.class_eval <<-end_eval + class NewGenerator < Rails::Generators::Base + class_option :generate, :default => true + end + end_eval - assert_equal false, klass.class_options[:generate].default + assert_equal false, NewGenerator.class_options[:generate].default ensure Rails::Generators.subclasses.delete(klass) end |