Sha256: f7dd51e1a8f5c7da80243bbac9f19f6b575742dd3801822283d469fb3872ffa2
Contents?: true
Size: 725 Bytes
Versions: 19
Compression:
Stored size: 725 Bytes
Contents
# stub frameworks like to gum up Object, so this is deliberately # set NOT to run so that you don't accidentally run it when you # run this dir. # To run it, stand in this directory and say: # # RUN_MOCHA_EXAMPLE=true ruby ../bin/spec mocking_with_mocha.rb if ENV['RUN_MOCHA_EXAMPLE'] Spec::Runner.configure do |config| config.mock_framework = :mocha end describe "Mocha framework" do it "should should be made available by saying config.mock_framework = :mocha" do m = mock() m.expects(:msg).with("arg") m.msg end it "should should be made available by saying config.mock_framework = :mocha" do o = Object.new o.expects(:msg).with("arg") o.msg end end end
Version data entries
19 entries across 19 versions & 1 rubygems