From f78708c180868d54e9b86e5d406b69e3de50f503 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Fri, 30 Jan 2015 14:54:41 +0100 Subject: use `bin/rails t` runner in `test_runner_test.rb`. --- railties/test/test_unit/runner_test.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'railties/test/test_unit/runner_test.rb') 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] -- cgit v1.2.3