Sha256: 9007c79b7650f21dbfe610ee53453b1c2944c22209412e0037831add2bb0ce00

Contents?: true

Size: 749 Bytes

Versions: 15

Compression:

Stored size: 749 Bytes

Contents

require "examples/example_helper"

describe RR, " backtrace tweaking" do
  it "hides rr library from the backtrace by default" do
    output = StringIO.new("")
    backtrace_tweaker = ::Spec::Runner::QuietBacktraceTweaker.new
    formatter = ::Spec::Runner::Formatter::BaseTextFormatter.new(output)
    reporter = ::Spec::Runner::Reporter.new([formatter], backtrace_tweaker)

    behaviour = ::Spec::DSL::Behaviour.new("example") {}
    subject = @subject
    behaviour.it("hides RR framework in backtrace") do
      mock(subject).foobar()
      RR::Space::instance.verify_double(subject, :foobar)
    end

    reporter.add_behaviour(behaviour)

    behaviour.run(reporter)
    reporter.dump

    output.string.should_not include("lib/rr")
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
rr-0.1.11 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.15 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.7 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.14 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.13 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.10 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.12 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.8 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.2.5 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.2.2 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.1.9 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.2.1 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.2.4 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.2.3 examples/rr/rspec/rspec_backtrace_tweaking_example.rb
rr-0.3.0 examples/rr/rspec/rspec_backtrace_tweaking_example.rb