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/edit.html.erb_spec.rb

27 lines
680 B

require 'spec_helper'
describe "/mashes/edit.html.erb" do
include MashesHelper
before(:each) do
assigns[:mash] = @mash = stub_model(Mash,
:new_record? => false,
:requester => "value for requester",
:map_a => 1,
:map_b => 1,
:winner => 1
)
end
it "renders the edit mash form" do
render
response.should have_tag("form[action=#{mash_path(@mash)}][method=post]") do
with_tag('input#mash_requester[name=?]', "mash[requester]")
with_tag('input#mash_map_a[name=?]', "mash[map_a]")
with_tag('input#mash_map_b[name=?]', "mash[map_b]")
with_tag('input#mash_winner[name=?]', "mash[winner]")
end
end
end