diff options
author | Yves Senn <yves.senn@gmail.com> | 2015-01-30 14:54:41 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2015-03-18 09:52:18 +0100 |
commit | f78708c180868d54e9b86e5d406b69e3de50f503 (patch) | |
tree | 8440a603bd9452f1e5100627145dc504d77bc350 /railties/test/test_unit | |
parent | de94929d70d94fd8bb20791bf544ee483db8ddc1 (diff) | |
download | rails-f78708c180868d54e9b86e5d406b69e3de50f503.tar.gz rails-f78708c180868d54e9b86e5d406b69e3de50f503.tar.bz2 rails-f78708c180868d54e9b86e5d406b69e3de50f503.zip |
use `bin/rails t` runner in `test_runner_test.rb`.
Diffstat (limited to 'railties/test/test_unit')
-rw-r--r-- | railties/test/test_unit/runner_test.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/railties/test/test_unit/runner_test.rb b/railties/test/test_unit/runner_test.rb index e8623bef67..fa5442c15c 100644 --- a/railties/test/test_unit/runner_test.rb +++ b/railties/test/test_unit/runner_test.rb @@ -58,8 +58,7 @@ class TestUnitTestRunnerTest < ActiveSupport::TestCase end test "run all tests in a directory" do - dir = Pathname.new(__dir__).basename.to_s - options = @options.parse([dir]) + options = @options.parse([__dir__]) assert_equal ["#{__dir__}/**/*_test.rb"], options[:patterns] assert_nil options[:filename] @@ -69,7 +68,7 @@ class TestUnitTestRunnerTest < ActiveSupport::TestCase test "run multiple folders" do application_dir = File.expand_path("#{__dir__}/../application") - options = @options.parse([Pathname.new(__dir__).basename.to_s, Pathname.new(application_dir).basename.to_s]) + options = @options.parse([__dir__, application_dir]) assert_equal ["#{__dir__}/**/*_test.rb", "#{application_dir}/**/*_test.rb"], options[:patterns] assert_nil options[:filename] @@ -81,7 +80,7 @@ class TestUnitTestRunnerTest < ActiveSupport::TestCase test "run multiple files and run one file by line" do line = __LINE__ - options = @options.parse([Pathname.new(__dir__).basename.to_s, "#{__FILE__}:#{line}"]) + options = @options.parse([__dir__, "#{__FILE__}:#{line}"]) assert_equal ["#{__dir__}/**/*_test.rb"], options[:patterns] assert_equal __FILE__, options[:filename] |