Created
February 10, 2012 13:12
-
-
Save floehopper/1789600 to your computer and use it in GitHub Desktop.
Mocha teardown hook not being fired by Rspec?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "bundler/setup" | |
RSpec.configure do |config| | |
config.mock_framework = :mocha | |
end | |
class Foo | |
def self.bar; end | |
end | |
describe Foo do | |
it "bar 1" do | |
Foo.expects(:bar) | |
Foo.bar | |
end | |
it "bar 2" do | |
Foo.bar | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source :rubygems | |
gem 'rspec', '2.8.0' | |
gem 'mocha', '0.10.4' |
Author
floehopper
commented
Feb 10, 2012
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment