diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 02:13:00 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2010-08-14 04:12:33 -0300 |
commit | b451de0d6de4df6bc66b274cec73b919f823d5ae (patch) | |
tree | f252c4143a0adb3be7d36d543282539cca0fb971 /activesupport/test/clean_backtrace_test.rb | |
parent | 1590377886820e00b1a786616518a32f3b61ec0f (diff) | |
download | rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.gz rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.tar.bz2 rails-b451de0d6de4df6bc66b274cec73b919f823d5ae.zip |
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
Diffstat (limited to 'activesupport/test/clean_backtrace_test.rb')
-rw-r--r-- | activesupport/test/clean_backtrace_test.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/activesupport/test/clean_backtrace_test.rb b/activesupport/test/clean_backtrace_test.rb index 86838a7f9a..32e346bb48 100644 --- a/activesupport/test/clean_backtrace_test.rb +++ b/activesupport/test/clean_backtrace_test.rb @@ -5,7 +5,7 @@ class BacktraceCleanerFilterTest < ActiveSupport::TestCase @bc = ActiveSupport::BacktraceCleaner.new @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 end @@ -14,14 +14,14 @@ class BacktraceCleanerFilterTest < ActiveSupport::TestCase @bc.remove_filters! assert_equal "/my/prefix/my/class.rb", @bc.clean(["/my/prefix/my/class.rb"]).first end - + test "backtrace should contain unaltered lines if they dont match a filter" do 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"], + ["/my/class.rb", "/my/module.rb"], @bc.clean([ "/my/prefix/my/class.rb", "/my/prefix/my/module.rb" ]) end end @@ -31,10 +31,10 @@ class BacktraceCleanerSilencerTest < ActiveSupport::TestCase @bc = ActiveSupport::BacktraceCleaner.new @bc.add_silencer { |line| line =~ /mongrel/ } end - + test "backtrace should not contain lines that match the silencer" do assert_equal \ - [ "/other/class.rb" ], + [ "/other/class.rb" ], @bc.clean([ "/mongrel/class.rb", "/other/class.rb", "/mongrel/stuff.rb" ]) end end @@ -45,7 +45,7 @@ class BacktraceCleanerFilterAndSilencerTest < ActiveSupport::TestCase @bc.add_filter { |line| line.gsub("/mongrel", "") } @bc.add_silencer { |line| line =~ /mongrel/ } end - + test "backtrace should not silence lines that has first had their silence hook filtered out" do assert_equal [ "/class.rb" ], @bc.clean([ "/mongrel/class.rb" ]) end |