diff options
author | Prathamesh Sonpatki <csonpatki@gmail.com> | 2015-12-21 22:14:47 +0530 |
---|---|---|
committer | Prathamesh Sonpatki <csonpatki@gmail.com> | 2015-12-21 22:33:16 +0530 |
commit | 8b8b6e9378bbe6938488074974a1aa8d147fd312 (patch) | |
tree | 85066529aca8a63987c0615f6cc5fccb36713c65 /railties | |
parent | 78b523d1823518da698d240131875d84f23c938c (diff) | |
download | rails-8b8b6e9378bbe6938488074974a1aa8d147fd312.tar.gz rails-8b8b6e9378bbe6938488074974a1aa8d147fd312.tar.bz2 rails-8b8b6e9378bbe6938488074974a1aa8d147fd312.zip |
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 |