1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

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
This commit is contained in:
Rafael Mendonça França 2013-11-22 14:53:31 -02:00
parent d5b71591df
commit 34c08d2ead

View file

@ -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