Skip to content

Instantly share code, notes, and snippets.

@mulderp mulderp/gist:778053
Created Jan 13, 2011

Embed
What would you like to do?
rspec a view of images
describe "main/index.html.erb" do
before(:each) do
@designs = mock("array of design")
@designs.stub!(:designs).and_return("test")
@d = mock("design")
@d.stub!(:name).and_return("test")
@d.stub!(:photo).and_return("medium_size.jpg")
@designs.stub!(:at).with(0).and_return(@d)
end
it "displays influence products" do
# assign(:designs, stub_model(Array.new(@d)))
render
rendered.should include("Influence")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.