To use Facon with Bacon, simply require
'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.
In spec_helper.rb
:
require 'rubygems' require 'bacon' require '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