aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application/test_runner_test.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2019-01-16 20:23:51 +0100
committerGitHub <noreply@github.com>2019-01-16 20:23:51 +0100
commit7e52e3b1c004eb22521c844b6adf69a2689cc1da (patch)
treecc79ff2e45951541fb8e2d2802c05adab0e5738a /railties/test/application/test_runner_test.rb
parent80873a49af6f52d48224d9c18c60e67c3f9d4731 (diff)
parentd7097cf5e00faf2ac4d02bd1a5c37801671ce70c (diff)
downloadrails-7e52e3b1c004eb22521c844b6adf69a2689cc1da.tar.gz
rails-7e52e3b1c004eb22521c844b6adf69a2689cc1da.tar.bz2
rails-7e52e3b1c004eb22521c844b6adf69a2689cc1da.zip
Merge pull request #34947 from bogdanvlviv/actioncable-testing-34933
Add `rails test:channels` and fix Action Cable templates
Diffstat (limited to 'railties/test/application/test_runner_test.rb')
-rw-r--r--railties/test/application/test_runner_test.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb
index 6765eef9d0..fda6df500d 100644
--- a/railties/test/application/test_runner_test.rb
+++ b/railties/test/application/test_runner_test.rb
@@ -98,6 +98,17 @@ module ApplicationTests
end
end
+ def test_run_channels
+ create_test_file :channels, "foo_channel"
+ create_test_file :channels, "bar_channel"
+
+ rails("test:channels").tap do |output|
+ assert_match "FooChannelTest", output
+ assert_match "BarChannelTest", output
+ assert_match "2 runs, 2 assertions, 0 failures", output
+ end
+ end
+
def test_run_controllers
create_test_file :controllers, "foo_controller"
create_test_file :controllers, "bar_controller"
@@ -167,11 +178,11 @@ module ApplicationTests
end
def test_run_all_suites
- suites = [:models, :helpers, :unit, :controllers, :mailers, :functional, :integration, :jobs, :mailboxes]
+ suites = [:models, :helpers, :unit, :channels, :controllers, :mailers, :functional, :integration, :jobs, :mailboxes]
suites.each { |suite| create_test_file suite, "foo_#{suite}" }
run_test_command("") .tap do |output|
suites.each { |suite| assert_match "Foo#{suite.to_s.camelize}Test", output }
- assert_match "9 runs, 9 assertions, 0 failures", output
+ assert_match "10 runs, 10 assertions, 0 failures", output
end
end