diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-22 14:53:31 -0200 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2013-11-22 14:53:31 -0200 |
commit | 34c08d2ead9360e1d9577dbc491d221ab66a2151 (patch) | |
tree | 9a194722f6e1a05868cbe9a4bf0df58529ad6fa9 /railties/test | |
parent | d5b71591dfa5dde3f0389ffb4e268f54334cc501 (diff) | |
download | rails-34c08d2ead9360e1d9577dbc491d221ab66a2151.tar.gz rails-34c08d2ead9360e1d9577dbc491d221ab66a2151.tar.bz2 rails-34c08d2ead9360e1d9577dbc491d221ab66a2151.zip |
Use a more generic assertion to make sure this tests will be useful.
Since we are using assert_no_match, if we change the code before
changing the tests, the tests will still pass and the assertion will
become useless
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 6fccd1b399..843b4da970 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -197,12 +197,11 @@ class AppGeneratorTest < Rails::Generators::TestCase end assert_file "app/views/layouts/application.html.erb" do |contents| - assert_no_match(/stylesheet_link_tag\s+"application", media: "all", "data-turbolinks-track" => true/, contents) - assert_no_match(/javascript_include_tag\s+"application", "data-turbolinks-track" => true/, contents) + assert_no_match('data-turbolinks-track', contents) end assert_file "app/assets/javascripts/application.js" do |contents| - assert_no_match %r{^//= require turbolinks}, contents + assert_no_match 'turbolinks', contents end ensure template.close |