Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tag: v2.0.0.beta.22
Fetching contributors…

Cannot retrieve contributors at this time

24 lines (20 sloc) 0.612 kB
Feature: mock with mocha
As an RSpec user who likes to mock
I want to be able to use mocha
Scenario: Mock with mocha
Given a file named "mocha_example_spec.rb" with:
"""
RSpec.configure do |config|
config.mock_framework = :mocha
end
describe "plugging in mocha" do
it "allows mocha to be used" do
target = Object.new
target.expects(:foo).once
target.foo
end
end
"""
When I run "rspec ./mocha_example_spec.rb"
Then the output should contain "1 example, 0 failures"
And the exit status should be 0
Jump to Line
Something went wrong with that request. Please try again.