aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/application/test_runner_test.rb8
-rw-r--r--railties/test/code_statistics_test.rb15
-rw-r--r--railties/test/generators/plugin_test_runner_test.rb8
3 files changed, 14 insertions, 17 deletions
diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb
index bb6c6574c5..0745abf381 100644
--- a/railties/test/application/test_runner_test.rb
+++ b/railties/test/application/test_runner_test.rb
@@ -382,14 +382,6 @@ module ApplicationTests
end
end
- def test_line_filter_without_line_runs_all_tests
- create_test_file :models, 'account'
-
- run_test_command('test/models/account_test.rb:').tap do |output|
- assert_match 'AccountTest', output
- end
- end
-
def test_shows_filtered_backtrace_by_default
create_backtrace_test
diff --git a/railties/test/code_statistics_test.rb b/railties/test/code_statistics_test.rb
index 1b1ff80bc1..4d80901217 100644
--- a/railties/test/code_statistics_test.rb
+++ b/railties/test/code_statistics_test.rb
@@ -4,7 +4,7 @@ require 'rails/code_statistics'
class CodeStatisticsTest < ActiveSupport::TestCase
def setup
@tmp_path = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'tmp'))
- @dir_js = File.expand_path(File.join(File.dirname(__FILE__), 'fixtures', 'tmp', 'lib.js'))
+ @dir_js = File.join(@tmp_path, 'lib.js')
FileUtils.mkdir_p(@dir_js)
end
@@ -17,4 +17,17 @@ class CodeStatisticsTest < ActiveSupport::TestCase
@code_statistics = CodeStatistics.new(['tmp dir', @tmp_path])
end
end
+
+ test 'ignores hidden files' do
+ File.write File.join(@tmp_path, '.example.rb'), <<-CODE
+ def foo
+ puts 'foo'
+ end
+ CODE
+
+ assert_nothing_raised do
+ CodeStatistics.new(['hidden file', @tmp_path])
+ end
+ end
+
end
diff --git a/railties/test/generators/plugin_test_runner_test.rb b/railties/test/generators/plugin_test_runner_test.rb
index f0fb63c208..f492cd49ef 100644
--- a/railties/test/generators/plugin_test_runner_test.rb
+++ b/railties/test/generators/plugin_test_runner_test.rb
@@ -59,14 +59,6 @@ class PluginTestRunnerTest < ActiveSupport::TestCase
end
end
- def test_line_filter_without_line_runs_all_tests
- create_test_file 'account'
-
- run_test_command('test/account_test.rb:').tap do |output|
- assert_match 'AccountTest', output
- end
- end
-
def test_output_inline_by_default
create_test_file 'post', pass: false