Skip to content

Commit

Permalink
use APIs to setup, verify, and teardown RSpec::Mocks
Browse files Browse the repository at this point in the history
  • Loading branch information
dchelimsky committed Jul 2, 2010
1 parent 8d59766 commit 443ac6e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/rspec/core/mocking/with_rspec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 443ac6e

Please sign in to comment.