Module: Facon::Baconize

Defined in:
lib/motion-facon/baconize.rb

Overview

Bacon integration

To use Facon with Bacon, simply require 'motion-facon'. Facon injects itself into Bacon if it can find it, so all you have to do is to make sure you have Bacon and Facon available on the load path.

Example

In spec_helper.rb:

require 'rubygems'
require 'bacon'
require 'motion-facon'

Simply require your spec_helper.rb in your specs and you are now able to create mocks and expectations:

require '/path/to/spec_helper'

describe 'My examples' do
  it "should allow mocks and expectations" do
    @mock = mock('test mock')
    @mock.should.receive(:message).and_return(:foo)

    do_something_with(@mock)
  end
end

Defined Under Namespace

Modules: ContextExtensions, ShouldExtensions