aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-07-04 17:34:48 +0200
committerJosé Valim <jose.valim@gmail.com>2009-07-04 20:17:32 +0200
commit35925a8995e4b3522e4a4e4e52a3a18c9c1cee52 (patch)
treedf14728fca2bd545e68b87113e837917bafb92e2 /railties/test
parent8ff214e0db31a6827b52f738c409d97d70b363d5 (diff)
downloadrails-35925a8995e4b3522e4a4e4e52a3a18c9c1cee52.tar.gz
rails-35925a8995e4b3522e4a4e4e52a3a18c9c1cee52.tar.bz2
rails-35925a8995e4b3522e4a4e4e52a3a18c9c1cee52.zip
Ensure that rails templates methods are invoked with the proper extensions [#2531 status:resolved]
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/actions_test.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/railties/test/generators/actions_test.rb b/railties/test/generators/actions_test.rb
index c17b599582..57ac3f0950 100644
--- a/railties/test/generators/actions_test.rb
+++ b/railties/test/generators/actions_test.rb
@@ -151,16 +151,34 @@ 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'"