summaryrefslogtreecommitdiff
path: root/spec/views/alerts/index.html.erb_spec.rb
blob: a5b4f3cc39834a53cfd606467cf1bb2defa68618 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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