Sha256: 7ce7fc73f065f1f61f2a571582df434535b01fb54ae508bbb051420effe25c64

Contents?: true

Size: 501 Bytes

Versions: 2

Compression:

Stored size: 501 Bytes

Contents

require 'spec_helper'

describe "posts/index.html.erb" do
  before(:each) do
    assign(:posts, [
      stub_model(Post,
        :title => "Title",
        :body => "MyText"
      ),
      stub_model(Post,
        :title => "Title",
        :body => "MyText"
      )
    ])
  end

  it "renders a list of posts" do
    render
    rendered.should have_selector("tr>td", :content => "Title".to_s, :count => 2)
    rendered.should have_selector("tr>td", :content => "MyText".to_s, :count => 2)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bobby-0.0.4 spec/views/posts/index.html.erb_spec.rb
bobby-0.0.3 spec/views/posts/index.html.erb_spec.rb