Sha256: 5ef7f7571ef0500beb8dfa355a02fce3ab61b1dfc0bc4d29b122796924ffca45

Contents?: true

Size: 428 Bytes

Versions: 10

Compression:

Stored size: 428 Bytes

Contents

require 'spec_helper'

describe Bogus::ResetsStubbedMethods do
  let(:double_tracker) { stub }
  let(:overwrites_methods) { stub }

  let(:resets_stubbed_methods) { isolate(Bogus::ResetsStubbedMethods) }

  it "resets all stubbed objects back to previous implementation" do
    foo = stub
    stub(double_tracker).doubles { [foo] }
    mock(overwrites_methods).reset(foo)

    resets_stubbed_methods.reset_all_doubles
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
bogus-0.1.5 spec/bogus/stubbing/resets_stubbed_methods_spec.rb
bogus-0.1.4 spec/bogus/stubbing/resets_stubbed_methods_spec.rb
bogus-0.1.3 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.1.2 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.1.1 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.1.0 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.0.4 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.0.3 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.0.3.rc.2 spec/bogus/resets_stubbed_methods_spec.rb
bogus-0.0.3.rc.1 spec/bogus/resets_stubbed_methods_spec.rb