aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/application
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-02-23 18:38:43 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2017-02-23 18:38:43 +0100
commit72fc0b446612134fa7e5cade2c6463a34306ff68 (patch)
tree31793c1ddaa3e54ed9a57f6708d3a1b0f5cb4b38 /railties/test/application
parent1c897f500e0ec995c3ae0685966813ac2811bfb7 (diff)
downloadrails-72fc0b446612134fa7e5cade2c6463a34306ff68.tar.gz
rails-72fc0b446612134fa7e5cade2c6463a34306ff68.tar.bz2
rails-72fc0b446612134fa7e5cade2c6463a34306ff68.zip
Add back tests for test:units and test:functionals.
Would have caught that the invoke changes broke rake delegation behavior. And we do ship the behavior so we should test it.
Diffstat (limited to 'railties/test/application')
-rw-r--r--railties/test/application/test_runner_test.rb28
1 files changed, 16 insertions, 12 deletions
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb
index ee03d8b86c..e773b52dbb 100644
--- a/railties/test/application/test_runner_test.rb
+++ b/railties/test/application/test_runner_test.rb
@@ -70,16 +70,18 @@ module ApplicationTests
end
def test_run_units
- skip "we no longer have the concept of unit tests. Just different directories..."
create_test_file :models, "foo"
create_test_file :helpers, "bar_helper"
create_test_file :unit, "baz_unit"
create_test_file :controllers, "foobar_controller"
- run_test_units_command.tap do |output|
- assert_match "FooTest", output
- assert_match "BarHelperTest", output
- assert_match "BazUnitTest", output
- assert_match "3 runs, 3 assertions, 0 failures", output
+
+ Dir.chdir(app_path) do
+ `bin/rails test:units`.tap do |output|
+ assert_match "FooTest", output
+ assert_match "BarHelperTest", output
+ assert_match "BazUnitTest", output
+ assert_match "3 runs, 3 assertions, 0 failures", output
+ end
end
end
@@ -117,16 +119,18 @@ module ApplicationTests
end
def test_run_functionals
- skip "we no longer have the concept of functional tests. Just different directories..."
create_test_file :mailers, "foo_mailer"
create_test_file :controllers, "bar_controller"
create_test_file :functional, "baz_functional"
create_test_file :models, "foo"
- run_test_functionals_command.tap do |output|
- assert_match "FooMailerTest", output
- assert_match "BarControllerTest", output
- assert_match "BazFunctionalTest", output
- assert_match "3 runs, 3 assertions, 0 failures", output
+
+ Dir.chdir(app_path) do
+ `bin/rails test:functionals`.tap do |output|
+ assert_match "FooMailerTest", output
+ assert_match "BarControllerTest", output
+ assert_match "BazFunctionalTest", output
+ assert_match "3 runs, 3 assertions, 0 failures", output
+ end
end
end