Permalink
Browse files

use APIs to setup, verify, and teardown RSpec::Mocks

  • Loading branch information...
1 parent 8d59766 commit 443ac6eec122b5c7acbdab1bc471f921e0e82c0b @dchelimsky dchelimsky committed Jul 2, 2010
Showing with 6 additions and 3 deletions.
  1. +6 −3 lib/rspec/core/mocking/with_rspec.rb
@@ -6,14 +6,17 @@ module Core
module MockFrameworkAdapter
include RSpec::Mocks::ExampleMethods
+
def _setup_mocks
- $rspec_mocks ||= RSpec::Mocks::Space.new
+ RSpec::Mocks::setup
end
+
def _verify_mocks
- $rspec_mocks.verify_all
+ RSpec::Mocks::verify
end
+
def _teardown_mocks
- $rspec_mocks.reset_all
+ RSpec::Mocks::teardown
end
end

0 comments on commit 443ac6e

Please sign in to comment.