rosa-build/spec/views/rights/new.html.haml_spec.rb

23 lines
687 B
Ruby
Raw Normal View History

2011-10-21 16:41:03 +01:00
require 'spec_helper'
describe "rights/new.html.haml" do
before(:each) do
assign(:right, stub_model(Right,
:controller_name => "MyString",
:method_name => "MyString",
:name => "MyString"
).as_new_record)
end
it "renders new right form" do
render
# Run the generator again with the --webrat flag if you want to use webrat matchers
assert_select "form", :action => rights_path, :method => "post" do
assert_select "input#right_controller_name", :name => "right[controller_name]"
assert_select "input#right_method_name", :name => "right[method_name]"
assert_select "input#right_name", :name => "right[name]"
end
end
end