Permalink
Browse files

Remove RSpec 2.8 compatibility shim.

We're only supporting 2.11+ now that it includes constant stubbing support.
  • Loading branch information...
1 parent fe59056 commit 45cf4d6643274dcb167b4eef80df0f914eb60915 @myronmarston myronmarston committed Aug 11, 2012
Showing with 2 additions and 15 deletions.
  1. +2 −15 lib/rspec/fire.rb
View
@@ -243,21 +243,8 @@ def self.build(doubled_class, stubs = {})
verify_constant_name if RSpec::Fire.configuration.verify_constant_names?
- # TestDouble was added after rspec 2.9.0, and allows proper mocking
- # of public methods that have clashing private methods. See spec for
- # details.
- if defined?(::RSpec::Mocks::TestDouble)
- ::RSpec::Mocks::TestDouble.extend_onto self,
- doubled_class, stubs.merge(:__declared_as => "FireClassDouble")
- else
- stubs.each do |message, response|
- stub(message).and_return(response)
- end
-
- def self.method_missing(name, *args)
- __mock_proxy.raise_unexpected_message_error(name, *args)
- end
- end
+ ::RSpec::Mocks::TestDouble.extend_onto self,
+ doubled_class, stubs.merge(:__declared_as => "FireClassDouble")
def self.as_replaced_constant(options = {})
RSpec::Mocks::ConstantStubber.stub(@__doubled_class_name, self, options)

0 comments on commit 45cf4d6

Please sign in to comment.