Sha256: b2f76693d1cecaad46848ef87caa85859106e0dc2d5b524e1565162ff4942ad6

Contents?: true

Size: 584 Bytes

Versions: 15

Compression:

Stored size: 584 Bytes

Contents

require 'spec_helper'

describe "profiles/index" do
  fixtures :all

  before(:each) do
    assign(:profiles, Profile.page(1))
    admin = User.friendly.find('enjuadmin')
    view.stub(:current_user).and_return(admin)
    view.stub(:params).and_return(ActionController::Parameters.new)
  end

  it "renders a list of profiles" do
    allow(view).to receive(:policy).and_return double(create?: true, update?: true, destroy?: true)
    render
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", text: 'enjuadmin'
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
enju_seed-0.3.6 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.5 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.4.0.rc.2 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.4 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.4.0.rc.1 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.4.0.beta.3 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.5.0.beta.1 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.4.0.beta.2 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.3 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.2 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.1 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.rc.1 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.beta.7 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.3.0.beta.6 spec/views/profiles/index.html.erb_spec.rb