diff options
author | Luke Kanies <luke@madstop.com> | 2007-08-23 11:52:31 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2007-08-23 11:52:31 -0500 |
commit | 58494cc8566da04711715e54274f472377b1aba0 (patch) | |
tree | 66bd610d359f549fc68e9985accf7b4141b7982e /test/lib/spec/mocks/methods.rb | |
parent | d59315a07a8a01ca65952d8e8fe9d2f1bb84d30e (diff) | |
download | puppet-58494cc8566da04711715e54274f472377b1aba0.tar.gz puppet-58494cc8566da04711715e54274f472377b1aba0.tar.xz puppet-58494cc8566da04711715e54274f472377b1aba0.zip |
Building a stand-alone spec directory for creating the new spec-based tests.
Diffstat (limited to 'test/lib/spec/mocks/methods.rb')
-rw-r--r-- | test/lib/spec/mocks/methods.rb | 39 |
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 |