提交 34c08d2e 编写于 作者: R Rafael Mendonça França

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
上级 d5b71591
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册