diff options
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/plugin_new_generator_test.rb | 6 | ||||
-rw-r--r-- | railties/test/generators/shared_generator_tests.rb | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/railties/test/generators/plugin_new_generator_test.rb b/railties/test/generators/plugin_new_generator_test.rb index b49945f153..9183945619 100644 --- a/railties/test/generators/plugin_new_generator_test.rb +++ b/railties/test/generators/plugin_new_generator_test.rb @@ -197,8 +197,8 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase assert_file "app/helpers/bukkits/application_helper.rb", /module Bukkits\n module ApplicationHelper/ assert_file "app/views/layouts/bukkits/application.html.erb" do |contents| assert_match "<title>Bukkits</title>", contents - assert_match /stylesheet_link_tag\s+['"]bukkits\/application['"]/, contents - assert_match /javascript_include_tag\s+['"]bukkits\/application['"]/, contents + assert_match(/stylesheet_link_tag\s+['"]bukkits\/application['"]/, contents) + assert_match(/javascript_include_tag\s+['"]bukkits\/application['"]/, contents) end end @@ -241,7 +241,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase run_generator [destination_root, "--skip-test-unit"] assert_no_file "test" assert_file "bukkits.gemspec" do |contents| - assert_no_match /s.test_files = Dir\["test\/\*\*\/\*"\]/, contents + assert_no_match(/s.test_files = Dir\["test\/\*\*\/\*"\]/, contents) end end diff --git a/railties/test/generators/shared_generator_tests.rb b/railties/test/generators/shared_generator_tests.rb index d3074afd91..1534f0d828 100644 --- a/railties/test/generators/shared_generator_tests.rb +++ b/railties/test/generators/shared_generator_tests.rb @@ -191,11 +191,11 @@ module SharedCustomGeneratorTests end def test_builder_option_with_http - path = "http://gist.github.com/103208.txt" + url = "http://gist.github.com/103208.txt" template = "class #{builder_class}; end" template.instance_eval "def read; self; end" # Make the string respond to read - generator([destination_root], :builder => path).expects(:open).with(path, 'Accept' => 'application/x-thor-template').returns(template) + generator([destination_root], :builder => url).expects(:open).with(url, 'Accept' => 'application/x-thor-template').returns(template) quietly { generator.invoke_all } default_files.each{ |path| assert_no_file(path) } |