diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2015-12-21 21:18:40 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2015-12-21 21:18:40 +0100 |
commit | daa890331e763a77759901d504601cf83a242504 (patch) | |
tree | 54818b7fdc138cde1bf1763716241d35d5f6d207 /railties | |
parent | 68af99c942bf00f3a53df72555d2d5e3b94978cf (diff) | |
parent | 8b8b6e9378bbe6938488074974a1aa8d147fd312 (diff) | |
download | rails-daa890331e763a77759901d504601cf83a242504.tar.gz rails-daa890331e763a77759901d504601cf83a242504.tar.bz2 rails-daa890331e763a77759901d504601cf83a242504.zip |
Merge pull request #22727 from prathamesh-sonpatki/fix-master
Ensure that assets are enabled back after the test that tests assets are disabled
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/channel_generator_test.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/test/generators/channel_generator_test.rb b/railties/test/generators/channel_generator_test.rb index 5cc1cd83b1..f58ff83ac9 100644 --- a/railties/test/generators/channel_generator_test.rb +++ b/railties/test/generators/channel_generator_test.rb @@ -7,7 +7,7 @@ class ChannelGeneratorTest < Rails::Generators::TestCase def test_channel_is_created run_generator ['chat'] - + assert_file "app/channels/chat_channel.rb" do |channel| assert_match(/class ChatChannel < ApplicationCable::Channel/, channel) end @@ -18,6 +18,7 @@ class ChannelGeneratorTest < Rails::Generators::TestCase end def test_channel_asset_is_not_created + enable_assets = Rails::Generators.options[:rails][:assets] Rails::Generators.options[:rails][:assets] = false run_generator ['chat'] @@ -26,5 +27,7 @@ class ChannelGeneratorTest < Rails::Generators::TestCase end assert_no_file "app/assets/javascripts/channels/chat.coffee" + ensure + Rails::Generators.options[:rails][:assets] = enable_assets end end |