Sha256: 42375e1e5a3b15f337e1bdf12482e4dc5f2f168a623e6ed36ebc9f6353060455

Contents?: true

Size: 370 Bytes

Versions: 15

Compression:

Stored size: 370 Bytes

Contents

require 'rails_helper'

RSpec.describe "categories/index", :type => :view do
  before(:each) do
    assign(:categories, [
      Category.create!(
        :name => "Name"
      ),
      Category.create!(
        :name => "Name"
      )
    ])
  end

  it "renders a list of categories" do
    render
    assert_select "tr>td", :text => "Name".to_s, :count => 2
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
restspec-0.3.2 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.3.1 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.3.0 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2.6 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2.5 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2.4 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2.3 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2.2 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2.1 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.2 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.1 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.0.4 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.0.3 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.0.2 examples/store-api/spec/views/categories/index.html.erb_spec.rb
restspec-0.0.1 examples/store-api/spec/views/categories/index.html.erb_spec.rb