Sha256: ab23b52dbc60c8f7e9d9aa093a10f6bd4edba4642881dea87c87669d827ebc20

Contents?: true

Size: 704 Bytes

Versions: 120

Compression:

Stored size: 704 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_with :mocha
  end
  describe "Mocha framework" do
    it "should should be made available by saying config.mock_with :mocha" do
      m = mock()
      m.expects(:msg).with("arg")
      m.msg
    end
    it "should should be made available by saying config.mock_with :mocha" do
      o = Object.new
      o.expects(:msg).with("arg")
      o.msg
    end
  end
end

Version data entries

120 entries across 120 versions & 21 rubygems

Version Path
spree-0.4.0 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
spree-0.4.1 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
spree-0.5.0 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
spree-0.6.0 vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb
spree-0.5.1 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
spree-0.7.0 vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb
spree-0.7.1 vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb
spree-0.8.0 vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb
spree-0.8.1 vendor/plugins/rspec/examples/failing/mocking_with_mocha.rb
typo-5.0.2 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.0.1 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.0.3.98.1 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.0 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.0.3.98 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.1.2 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.1.1 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.1.3 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.1.98 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.1 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb
typo-5.2 vendor/plugins/rspec/failing_examples/mocking_with_mocha.rb