Sha256: db80134b02d23100e813bccc59c40853fc6f3b03530b6d34b730e2d1efc928d0

Contents?: true

Size: 710 Bytes

Versions: 1

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'

describe "assignments/index" do
  before(:each) do
    assign(:assignments, [
      stub_model(Assignment,
        :title => "Title",
        :description => "Description",
        :text => "Text"
      ),
      stub_model(Assignment,
        :title => "Title",
        :description => "Description",
        :text => "Text"
      )
    ])
  end

  it "renders a list of assignments" do
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Title".to_s, :count => 2
    assert_select "tr>td", :text => "Description".to_s, :count => 2
    assert_select "tr>td", :text => "Text".to_s, :count => 2
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
discussion-0.0.1 test/dummy/spec/views/assignments/index.html.erb_spec.rb