diff options
author | José Valim <jose.valim@gmail.com> | 2009-07-06 18:31:28 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2009-07-06 18:31:28 +0200 |
commit | 66d1b968d108787114372144e97f4f817847892b (patch) | |
tree | fde26589fbb2fe4abc79e10e09068b4e5d18972b /railties/test/generators/actions_test.rb | |
parent | eeb6a0786a061b640bcd90a5d90bd0d0215fe809 (diff) | |
download | rails-66d1b968d108787114372144e97f4f817847892b.tar.gz rails-66d1b968d108787114372144e97f4f817847892b.tar.bz2 rails-66d1b968d108787114372144e97f4f817847892b.zip |
Make specs pass on Ruby 1.9.
Diffstat (limited to 'railties/test/generators/actions_test.rb')
-rw-r--r-- | railties/test/generators/actions_test.rb | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb index 57ac3f0950..3313e92c31 100644 --- a/railties/test/generators/actions_test.rb +++ b/railties/test/generators/actions_test.rb @@ -98,7 +98,10 @@ class ActionsTest < GeneratorsTestCase '# This will be added' end - assert_file 'config/environment.rb', /# This will be added/ + assert_file 'config/environment.rb' do |content| + assert_match /# This will be added/, content + assert_no_match /# This wont be added/, content + end end def test_git_with_symbol_should_run_command_using_git_scm @@ -151,34 +154,16 @@ class ActionsTest < GeneratorsTestCase action :rake, 'log:clear', :sudo => true end - def test_rake_uses_ruby_extension - Thor::Util.expects(:ruby_command).returns('ruby.bat') - generator.expects(:run).once.with('rake.bat log:clear RAILS_ENV=development', false) - action :rake, 'log:clear' - end - def test_capify_should_run_the_capify_command generator.expects(:run).once.with('capify .', false) action :capify! end - def test_capify_uses_ruby_extension - Thor::Util.expects(:ruby_command).returns('ruby.bat') - generator.expects(:run).once.with('capify.bat .', false) - action :capify! - end - def test_freeze_should_freeze_rails_edge generator.expects(:run).once.with('rake rails:freeze:edge', false) action :freeze! end - def test_freeze_uses_ruby_extension - Thor::Util.expects(:ruby_command).returns('ruby.bat') - generator.expects(:run).once.with('rake.bat rails:freeze:edge', false) - action :freeze! - end - def test_route_should_add_data_to_the_routes_block_in_config_routes run_generator route_command = "map.route '/login', :controller => 'sessions', :action => 'new'" |