diff options
Diffstat (limited to 'spec/views/alerts')
-rw-r--r-- | spec/views/alerts/edit.html.erb_spec.rb | 20 | ||||
-rw-r--r-- | spec/views/alerts/index.html.erb_spec.rb | 23 | ||||
-rw-r--r-- | spec/views/alerts/new.html.erb_spec.rb | 20 | ||||
-rw-r--r-- | spec/views/alerts/show.html.erb_spec.rb | 17 |
4 files changed, 0 insertions, 80 deletions
diff --git a/spec/views/alerts/edit.html.erb_spec.rb b/spec/views/alerts/edit.html.erb_spec.rb deleted file mode 100644 index d837f26..0000000 --- a/spec/views/alerts/edit.html.erb_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -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 diff --git a/spec/views/alerts/index.html.erb_spec.rb b/spec/views/alerts/index.html.erb_spec.rb deleted file mode 100644 index a5b4f3c..0000000 --- a/spec/views/alerts/index.html.erb_spec.rb +++ /dev/null @@ -1,23 +0,0 @@ -require 'spec_helper' - -describe "alerts/index" do - before(:each) do - assign(:alerts, [ - stub_model(Alert, - :author => nil, - :message => "MyText" - ), - stub_model(Alert, - :author => nil, - :message => "MyText" - ) - ]) - end - - it "renders a list of alerts" do - render - # Run the generator again with the --webrat flag if you want to use webrat matchers - assert_select "tr>td", :text => nil.to_s, :count => 2 - assert_select "tr>td", :text => "MyText".to_s, :count => 2 - end -end diff --git a/spec/views/alerts/new.html.erb_spec.rb b/spec/views/alerts/new.html.erb_spec.rb deleted file mode 100644 index e38cbd3..0000000 --- a/spec/views/alerts/new.html.erb_spec.rb +++ /dev/null @@ -1,20 +0,0 @@ -require 'spec_helper' - -describe "alerts/new" do - before(:each) do - assign(:alert, stub_model(Alert, - :author => nil, - :message => "MyText" - ).as_new_record) - end - - it "renders new alert form" do - render - - # Run the generator again with the --webrat flag if you want to use webrat matchers - assert_select "form[action=?][method=?]", alerts_path, "post" do - assert_select "input#alert_author[name=?]", "alert[author]" - assert_select "textarea#alert_message[name=?]", "alert[message]" - end - end -end diff --git a/spec/views/alerts/show.html.erb_spec.rb b/spec/views/alerts/show.html.erb_spec.rb deleted file mode 100644 index 267c9f1..0000000 --- a/spec/views/alerts/show.html.erb_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -require 'spec_helper' - -describe "alerts/show" do - before(:each) do - @alert = assign(:alert, stub_model(Alert, - :author => nil, - :message => "MyText" - )) - end - - it "renders attributes in <p>" do - render - # Run the generator again with the --webrat flag if you want to use webrat matchers - rendered.should match(//) - rendered.should match(/MyText/) - end -end |