summaryrefslogtreecommitdiffstats
path: root/test/lib/spec/mocks/methods.rb
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib/spec/mocks/methods.rb')
-rw-r--r--test/lib/spec/mocks/methods.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/test/lib/spec/mocks/methods.rb b/test/lib/spec/mocks/methods.rb
deleted file mode 100644
index 3d898cf31..000000000
--- a/test/lib/spec/mocks/methods.rb
+++ /dev/null
@@ -1,39 +0,0 @@
-module Spec
- module Mocks
- module Methods
- def should_receive(sym, opts={}, &block)
- __mock_proxy.add_message_expectation(opts[:expected_from] || caller(1)[0], sym.to_sym, opts, &block)
- end
-
- def should_not_receive(sym, &block)
- __mock_proxy.add_negative_message_expectation(caller(1)[0], sym.to_sym, &block)
- end
-
- def stub!(sym)
- __mock_proxy.add_stub(caller(1)[0], sym.to_sym)
- end
-
- def received_message?(sym, *args, &block) #:nodoc:
- __mock_proxy.received_message?(sym.to_sym, *args, &block)
- end
-
- def rspec_verify #:nodoc:
- __mock_proxy.verify
- end
-
- def rspec_reset #:nodoc:
- __mock_proxy.reset
- end
-
- private
-
- def __mock_proxy
- if Mock === self
- @mock_proxy ||= Proxy.new(self, @name, @options)
- else
- @mock_proxy ||= Proxy.new(self, self.class.name)
- end
- end
- end
- end
-end