Sha256: 3372394dbb7747741a166c48b738554ba714509441995712b453bd2c4f3a8f0a

Contents?: true

Size: 623 Bytes

Versions: 4

Compression:

Stored size: 623 Bytes

Contents

require 'test_helper'

class RailsTest < MiniTest::Spec
  
  before do
    @cleaner = Rails.backtrace_cleaner
  end
  
  after do
    @cleaner.remove_silencers!
    @cleaner.remove_filters!
  end
  
  it 'load rails' do
    @cleaner.must_be_instance_of Rails::BacktraceCleaner
  end
  
  it 'should use rails backtrace silencer' do
    @cleaner.add_silencer { |line| line =~ /noisy/ }
    noisy_traces = ["gems/noisy-4.2.0/lib/noisy.rb", "gems/noisy-4.2.0/lib/cricket.rb"]
    good_traces = ["test/rail_test.rb"]
    bt = noisy_traces + good_traces
    MiniTest.filter_backtrace(bt).must_equal good_traces
  end
  
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mini_backtrace-0.1.3 test/rail_test.rb
mini_backtrace-0.1.2 test/rail_test.rb
mini_backtrace-0.1.1 test/rail_test.rb
mini_backtrace-0.1.0 test/rail_test.rb