Sha256: 703b21329219d029a83347f30d7fa8041e954eb348d75846e945bafdc79056ac

Contents?: true

Size: 496 Bytes

Versions: 5

Compression:

Stored size: 496 Bytes

Contents

require 'spec_helper'

describe "<%= ns_table_name %>/index" 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

5 entries across 5 versions & 1 rubygems

Version Path
stationed-0.4.0 lib/templates/rspec/scaffold/index_spec.rb
stationed-0.3.0 lib/templates/rspec/scaffold/index_spec.rb
stationed-0.2.0 lib/templates/rspec/scaffold/index_spec.rb
stationed-0.1.0 lib/templates/rspec/scaffold/index_spec.rb
stationed-0.0.1 lib/templates/rspec/scaffold/index_spec.rb