Instiki 0.16.3: Rails 2.3.0
Instiki now runs on the Rails 2.3.0 Candidate Release. Among other improvements, this means that it now automagically selects between WEBrick and Mongrel. Just run ./instiki --daemon
This commit is contained in:
parent
43aadecc99
commit
4e14ccc74d
893 changed files with 71965 additions and 28511 deletions
47
vendor/rails/activesupport/test/clean_backtrace_test.rb
vendored
Normal file
47
vendor/rails/activesupport/test/clean_backtrace_test.rb
vendored
Normal file
|
@ -0,0 +1,47 @@
|
|||
require 'abstract_unit'
|
||||
|
||||
class BacktraceCleanerFilterTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
@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
|
||||
|
||||
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"],
|
||||
@bc.clean([ "/my/prefix/my/class.rb", "/my/prefix/my/module.rb" ])
|
||||
end
|
||||
end
|
||||
|
||||
class BacktraceCleanerSilencerTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
@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" ],
|
||||
@bc.clean([ "/mongrel/class.rb", "/other/class.rb", "/mongrel/stuff.rb" ])
|
||||
end
|
||||
end
|
||||
|
||||
class BacktraceCleanerFilterAndSilencerTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
@bc = ActiveSupport::BacktraceCleaner.new
|
||||
@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
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue