Sha256: 834809a4ef39db059a0f7ee28158bf942d41f72af386d4766b0746c30e393821

Contents?: true

Size: 492 Bytes

Versions: 2

Compression:

Stored size: 492 Bytes

Contents

RSpec.describe "<%= ns_table_name %>/index", type: :view do
  let(:<%= table_name %>) { build_stubbed_list :<%= ns_file_name %>, 3 }

  before do
    assign :<%= table_name %>, <%= table_name %>
    allow(view).to receive(:paginate).and_return('pagination')
  end

  it 'paginates the results' do
    expect(view).to receive(:paginate).with(<%= table_name %>)
    render
  end

  it "renders a list of <%= ns_table_name %>" do
    render
    assert_select 'tr>td', text: 'MyString'
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
stationed-0.6.0 lib/templates/rspec/scaffold/index_spec.rb
stationed-0.5.0 lib/templates/rspec/scaffold/index_spec.rb