Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove extra test case. #6784

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 4 additions & 7 deletions activesupport/test/clean_backtrace_test.rb
Expand Up @@ -6,8 +6,10 @@ def setup
@bc.add_filter { |line| line.gsub("/my/prefix", '') }
end

test "backtrace should not contain prefix when it has been filtered out" do
assert_equal "/my/class.rb", @bc.clean([ "/my/prefix/my/class.rb" ]).first
test "backtrace should filter all lines in a backtrace, removing prefixes" do
assert_equal \
["/my/class.rb", "/my/module.rb"],
@bc.clean(["/my/prefix/my/class.rb", "/my/prefix/my/module.rb"])
end

test "backtrace cleaner should allow removing filters" do
Expand All @@ -19,11 +21,6 @@ def setup
assert_equal "/my/other_prefix/my/class.rb", @bc.clean([ "/my/other_prefix/my/class.rb" ]).first
end

test "backtrace should filter all lines in a backtrace" do
assert_equal \
["/my/class.rb", "/my/module.rb"],
@bc.clean([ "/my/prefix/my/class.rb", "/my/prefix/my/module.rb" ])
end
end

class BacktraceCleanerSilencerTest < ActiveSupport::TestCase
Expand Down