Sha256: 344a1acc74d19b448cf98f5f114fce63ba91b5f78b41350b71299e94f48354a3
Contents?: true
Size: 1.42 KB
Versions: 2
Compression:
Stored size: 1.42 KB
Contents
require "spec/spec_helper" module RR module Adapters describe Rspec do describe "#trim_backtrace" do it "does not set trim_backtrace" do RR.trim_backtrace.should == false end end describe ".included" do it "does not add backtrace identifier twice" do length = ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS.length class << Object.new include ::RR::Adapters::Rspec end ::Spec::Runner::QuietBacktraceTweaker::IGNORE_PATTERNS.length.should == length end end describe " backtrace tweaking" do attr_reader :original_rspec_options, :output before do @original_rspec_options = $rspec_options @output = StringIO.new("") $rspec_options = ::Spec::Runner::Options.new(output, StringIO.new) end after do $rspec_options = original_rspec_options end it "hides rr library from the backtrace by default" do subject = @subject Class.new(::Spec::Example::ExampleGroup) do describe "Example" it("hides RR framework in backtrace") do mock(subject).foobar() RR::Space::instance.verify_double(subject, :foobar) end end $rspec_options.run_examples output.string.should_not include("lib/rr") end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rr-0.4.10 | spec/rr/rspec/rspec_backtrace_tweaking_spec.rb |
rr-0.4.9 | spec/rr/rspec/rspec_backtrace_tweaking_spec.rb |