How would you write a new.html.erb_spec.rb view spec for this relationship. I am stumped.
resources :things do
resources :reviews
end
Thank you.
Kent
How would you write a new.html.erb_spec.rb view spec for this relationship. I am stumped.
resources :things do
resources :reviews
end
Thank you.
Kent
require 'spec_helper'
describe "reviews/new.html.erb" do
before(:each) do
assign(:thing,mock_model(Thing) # RSpec 2 syntax
end
it "shows the page" do
render
end
end
After the render
statement add a matcher for content in the page, like:
rendered.should contain("some text to match")