Sha256: 27d40903b2b78d3548fa1c4bfc11586b0d39e1021058ebd6d8166ade6a2058d9

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

require 'spec_helpers/boot'

describe DerivedController do
  it 'should inherit user-specified protector subject' do
    DerivedController.effective_protector_subject.should == :custom_current_user
  end

  it 'assigns proper user' do
    get :show, :id => 1
    assigns(:derived).protector_subject?.should be_true
    assigns(:derived).protector_subject.should == 'custom_user'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
protector-inherited_resources-0.0.1 spec/controllers/derived_spec.rb