1 2 3 4 5 6 7 8 9 10 |
describe "Something" do
it "should mock a call to an array" do
odontogram = mock("odontogram")
photos = mock("photos")
odontogram.stub!(:photos).and_return(photos)
photos.should_receive(:[]).with(1).and_return("Some Value")
odontogram.photos[1]
end
end
|

