diff options
author | Nikita Fedyashev <nfedyashev@gmail.com> | 2013-06-28 17:11:50 +0600 |
---|---|---|
committer | Nikita Fedyashev <nfedyashev@gmail.com> | 2013-06-28 18:53:32 +0600 |
commit | e68183cccbfbefab66c2e74855f5b30525f8e902 (patch) | |
tree | b388abd8bbe0d68d3668cafb272bd87f48fb7e20 /railties/test | |
parent | 569227b0914f4592fbee897d9c97f5f740dd2637 (diff) | |
download | rails-e68183cccbfbefab66c2e74855f5b30525f8e902.tar.gz rails-e68183cccbfbefab66c2e74855f5b30525f8e902.tar.bz2 rails-e68183cccbfbefab66c2e74855f5b30525f8e902.zip |
Omit turbolinks configuration completely on skip_javascript generator option
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index e992534938..42b6275932 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -53,9 +53,10 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_assets run_generator - assert_file "app/views/layouts/application.html.erb", /stylesheet_link_tag\s+"application"/ - assert_file "app/views/layouts/application.html.erb", /javascript_include_tag\s+"application"/ - assert_file "app/assets/stylesheets/application.css" + + assert_file("app/views/layouts/application.html.erb", /stylesheet_link_tag\s+"application", media: "all", "data-turbolinks-track" => true/) + assert_file("app/views/layouts/application.html.erb", /javascript_include_tag\s+"application", "data-turbolinks-track" => true/) + assert_file("app/assets/stylesheets/application.css") end def test_invalid_application_name_raises_an_error @@ -295,6 +296,10 @@ class AppGeneratorTest < Rails::Generators::TestCase assert_file "app/assets/javascripts/application.js" do |contents| assert_no_match %r{^//=\s+require\s}, contents end + assert_file "app/views/layouts/application.html.erb" do |contents| + assert_match(/stylesheet_link_tag\s+"application", media: "all" %>/, contents) + assert_match(/javascript_include_tag\s+"application" \%>/, contents) + end assert_file "Gemfile" do |content| assert_match(/coffee-rails/, content) end |