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

Merge pull request #22727 from prathamesh-sonpatki/fix-master

Ensure that assets are enabled back after the test that tests assets are disabled
This commit is contained in:
Kasper Timm Hansen 2015-12-21 21:18:40 +01:00
commit daa890331e

View file

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