box-o-sand/rails/map-mash/spec/views/mashes/index.html.erb_spec.rb
2012-03-04 11:51:35 -05:00

31 lines
692 B
Ruby

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