Change // style regexp to %r{}, to not confuse editors code highlighting

This commit is contained in:
Piotr Sarnacki
2010-10-20 20:45:21 +02:00
parent e51e9e2db0
commit 59d52229f9

View File

@@ -140,7 +140,7 @@ class PluginNewGeneratorTest < Rails::Generators::TestCase
def test_edge_option
generator([destination_root], :edge => true).expects(:run).with("#{@bundle_command} install")
silence(:stdout){ generator.invoke_all }
assert_file 'Gemfile', /^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["']$/
assert_file 'Gemfile', %r{^gem\s+["']rails["'],\s+:git\s+=>\s+["']#{Regexp.escape("git://github.com/rails/rails.git")}["']$}
end
protected