Sha256: 84610c6410aa105b122b3fb6ea8d77a442b215d884cd78ca45fe455189a0f6ed

Contents?: true

Size: 587 Bytes

Versions: 13

Compression:

Stored size: 587 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

13 entries across 12 versions & 2 rubygems

Version Path
enju_seed-0.2.3 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.2 spec/views/profiles/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_seed-0.2.0/spec/views/profiles/index.html.erb_spec.rb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/enju_seed-0.2.1/spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.1 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0.beta.7 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0.beta.6 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0.beta.5 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0.beta.4 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0.beta.3 spec/views/profiles/index.html.erb_spec.rb
enju_seed-0.2.0.beta.2 spec/views/profiles/index.html.erb_spec.rb
enju_leaf-1.2.0.beta.1 spec/views/profiles/index.html.erb_spec.rb