Sha256: c838ea86cd11680f7633f2e2f307d64f2365a8f8b3c8522877a8f1543f673aec

Contents?: true

Size: 486 Bytes

Versions: 26

Compression:

Stored size: 486 Bytes

Contents

require "rails_helper"

RSpec.describe "posts/index", type: :view do
  let(:posts) { [create(:post, title: "Title", body: "Body"), create(:post)] }
  before(:each) do
    assign(:posts, posts)
  end

  it "renders a list of posts" do
    render
    assert_select "tr>td", text: "Title", count: 1
    assert_select "tr>td", text: "Body", count: 1

    assert_select "tr>td", text: "This is a post", count: 1
    assert_select "tr>td", text: "It has a lot of content", count: 1
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
sapience-1.0.11 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.10 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.9 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.8 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.7 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.6 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.5 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.4 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.3 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.2 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.1 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-1.0.0 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.18 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.17 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.16 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.15 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.14 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.13 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.12 test_apps/rails/spec/views/posts/index.html.slim_spec.rb
sapience-0.2.11 test_apps/rails/spec/views/posts/index.html.slim_spec.rb