You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
box-o-sand/rails/map-mash/spec/views/mashes/index.html.erb_spec.rb

31 lines
692 B

require 'spec_helper'
describe "/mashes/index.html.erb" do
include MashesHelper
before(:each) do
assigns[:mashes] = [
stub_model(Mash,
:requester => "value for requester",
:map_a => 1,
:map_b => 1,
:winner => 1
),
stub_model(Mash,
:requester => "value for requester",
:map_a => 1,
:map_b => 1,
:winner => 1
)
]
end
it "renders a list of mashes" do
render
response.should have_tag("tr>td", "value for requester".to_s, 2)
response.should have_tag("tr>td", 1.to_s, 2)
response.should have_tag("tr>td", 1.to_s, 2)
response.should have_tag("tr>td", 1.to_s, 2)
end
end