describe Mock, "usage" do
before(:each) do
@type_of = mock(YouShould, :define => "your mock requirements")
AMock.should_receive(:requests_for_data).
with("information you provide").and_return("anything")
end
it "should be intuitive" do
@mocks.should_be easy_to_read
end
it "should not be reliant on fixtures" do
@a_good = mock(IsNotReliantOn, :fixtures => "at all")
@a_good.without_fixtures = "happiness"
end
it "should describe what you are doing" do
@mocks.help("You define your application")
@mocks.should help_not_hinder_production
end
end
|