Sha256: 1c0ec84bb67696620bb6d4e6ef552f6b371a5843f2c9ef76ccda5373723a92b5

Contents?: true

Size: 347 Bytes

Versions: 2

Compression:

Stored size: 347 Bytes

Contents

require 'unit_spec_helper'

module AccessPolicyRails
  describe PolicyWrapper do
    subject{
      PolicyWrapper.new(policy)
    }

    let(:policy){
      double('policy', create?: true)
    }

    describe '#allow?'do
      it 'delegates to the policy object' do
        expect(subject.allow?(:create)).to be_truthy
      end
    end

  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
access_policy_rails-0.0.2 spec/unit/lib/access_policy_rails/policy_wrapper_spec.rb
access_policy_rails-0.0.1 spec/unit/lib/access_policy_rails/policy_wrapper_spec.rb