Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 34c08d2ead9360e1d9577dbc491d221ab66a2151 1 parent d5b7159
@rafaelfranca rafaelfranca authored
Showing with 2 additions and 3 deletions.
  1. +2 −3 railties/test/generators/app_generator_test.rb
View
5 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
Please sign in to comment.
Something went wrong with that request. Please try again.