提交 b884ee6f 编写于 作者: K Kasper Timm Hansen

Merge pull request #23951 from teoljungberg/warning-free

Address ruby warnings
......@@ -40,7 +40,7 @@ class MailerIntegrationTest < ActionDispatch::IntegrationTest
output = Dir.chdir(app_path) { `bin/rails test 2>&1` }
assert_equal 0, $?.to_i, output
assert_match /0 failures, 0 errors/, output
assert_match(/0 failures, 0 errors/, output)
end
end
end
......@@ -6,16 +6,16 @@ class ChannelGeneratorTest < Rails::Generators::TestCase
tests Rails::Generators::ChannelGenerator
def test_application_cable_skeleton_is_created
run_generator ['books']
run_generator ['books']
assert_file "app/channels/application_cable/channel.rb" do |cable|
assert_match(/module ApplicationCable\n class Channel < ActionCable::Channel::Base\n/, cable)
end
assert_file "app/channels/application_cable/channel.rb" do |cable|
assert_match(/module ApplicationCable\n class Channel < ActionCable::Channel::Base\n/, cable)
end
assert_file "app/channels/application_cable/connection.rb" do |cable|
assert_match(/module ApplicationCable\n class Connection < ActionCable::Connection::Base\n/, cable)
end
end
assert_file "app/channels/application_cable/connection.rb" do |cable|
assert_match(/module ApplicationCable\n class Connection < ActionCable::Connection::Base\n/, cable)
end
end
def test_channel_is_created
run_generator ['chat']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册