From 11be92e4bac671852fd03922049ca592ae4c9f4e Mon Sep 17 00:00:00 2001 From: DavisLWebb Date: Sat, 1 Mar 2014 20:24:43 -0500 Subject: changed the gemfile to include rspecy testing and a security name i cant remember the name of --- spec/views/alerts/edit.html.erb_spec.rb | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 spec/views/alerts/edit.html.erb_spec.rb (limited to 'spec/views/alerts/edit.html.erb_spec.rb') diff --git a/spec/views/alerts/edit.html.erb_spec.rb b/spec/views/alerts/edit.html.erb_spec.rb new file mode 100644 index 0000000..d837f26 --- /dev/null +++ b/spec/views/alerts/edit.html.erb_spec.rb @@ -0,0 +1,20 @@ +require 'spec_helper' + +describe "alerts/edit" do + before(:each) do + @alert = assign(:alert, stub_model(Alert, + :author => nil, + :message => "MyText" + )) + end + + it "renders the edit alert form" do + render + + # Run the generator again with the --webrat flag if you want to use webrat matchers + assert_select "form[action=?][method=?]", alert_path(@alert), "post" do + assert_select "input#alert_author[name=?]", "alert[author]" + assert_select "textarea#alert_message[name=?]", "alert[message]" + end + end +end -- cgit v1.2.3-2-g168b