Files
fetsite/spec/views/attachments/new.html.erb_spec.rb
2013-08-05 18:31:04 +02:00

19 lines
475 B
Ruby

require 'spec_helper'
describe "attachments/new" do
before(:each) do
assign(:attachment, stub_model(Attachment,
:name => "MyString"
).as_new_record)
end
it "renders new attachment form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form[action=?][method=?]", attachments_path, "post" do
assert_select "input#attachment_name[name=?]", "attachment[name]"
end
end
end