Displaying 1 result from an estimated 1 matches for "find_available_to".
2007 Jan 24
2
A spec where interaction-based testing breaks down... (at least for now)
Here are the specs:
context "Finding all the stylesheets available to a company" do
setup do
@mock_company = mock("company")
@mock_company.stub!(:to_param).and_return "1"
Stylesheet.stub!(:find)
end
def do_find
Stylesheet.find_available_to @mock_company
end
specify "should convert the company into a parameter" do
@mock_company.should_receive(:to_param).and_return "1"
do_find
end
specify "should find stylesheets belonging to only the company or to
nobody" do
Stylesheet.should_receive...