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

Address ruby warnings

- Ambiguous first argument
- Mismatched indentation
This commit is contained in:
Teo Ljungberg 2016-02-28 23:59:32 +01:00
parent caa6fb3eb4
commit 5a0dddda09
No known key found for this signature in database
GPG key ID: 8A5B0113B5D3178C
2 changed files with 9 additions and 9 deletions

View file

@ -40,7 +40,7 @@ module ApplicationTests
output = Dir.chdir(app_path) { `bin/rails test 2>&1` } output = Dir.chdir(app_path) { `bin/rails test 2>&1` }
assert_equal 0, $?.to_i, output assert_equal 0, $?.to_i, output
assert_match /0 failures, 0 errors/, output assert_match(/0 failures, 0 errors/, output)
end end
end end
end end

View file

@ -6,16 +6,16 @@ class ChannelGeneratorTest < Rails::Generators::TestCase
tests Rails::Generators::ChannelGenerator tests Rails::Generators::ChannelGenerator
def test_application_cable_skeleton_is_created def test_application_cable_skeleton_is_created
run_generator ['books'] run_generator ['books']
assert_file "app/channels/application_cable/channel.rb" do |cable| assert_file "app/channels/application_cable/channel.rb" do |cable|
assert_match(/module ApplicationCable\n class Channel < ActionCable::Channel::Base\n/, cable) assert_match(/module ApplicationCable\n class Channel < ActionCable::Channel::Base\n/, cable)
end end
assert_file "app/channels/application_cable/connection.rb" do |cable| assert_file "app/channels/application_cable/connection.rb" do |cable|
assert_match(/module ApplicationCable\n class Connection < ActionCable::Connection::Base\n/, cable) assert_match(/module ApplicationCable\n class Connection < ActionCable::Connection::Base\n/, cable)
end end
end end
def test_channel_is_created def test_channel_is_created
run_generator ['chat'] run_generator ['chat']