Permalink
Browse files

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
  • Loading branch information...
1 parent d5b7159 commit 34c08d2ead9360e1d9577dbc491d221ab66a2151 @rafaelfranca rafaelfranca committed Nov 22, 2013
Showing with 2 additions and 3 deletions.
  1. +2 −3 railties/test/generators/app_generator_test.rb
@@ -197,12 +197,11 @@ def test_skip_turbolinks_when_it_is_not_on_gemfile
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

0 comments on commit 34c08d2

Please sign in to comment.