Sha256: f78708e9a02a4f8be01792d6fc94c37bcf98785e4f73d9d29e35a52fe4646003

Contents?: true

Size: 666 Bytes

Versions: 9

Compression:

Stored size: 666 Bytes

Contents

require 'spec_helper'

describe "exemplifies/index" do
  before(:each) do
    assign(:exemplifies, [
      stub_model(Exemplify,
        :manifestation_id => 1,
        :item_id => 1
      ),
      stub_model(Exemplify,
        :manifestation_id => 1,
        :item_id => 2
      )
    ].paginate(:page => 1))
    @ability = Object.new
    @ability.extend(CanCan::Ability)
    controller.stub(:current_ability) { @ability }
  end

  it "renders a list of exemplifies" do
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => Manifestation.find(1).original_title, :count => 2
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
enju_biblio-0.0.9 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.8 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.7 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.6 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.5 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.4 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.3 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.2 spec/views/exemplifies/index.html.erb_spec.rb
enju_biblio-0.0.1 spec/views/exemplifies/index.html.erb_spec.rb