Sha256: bef212e83c72db474b42c40fde8d7fb72fc522ab09f8afb0af488a5c0992592e
Contents?: true
Size: 785 Bytes
Versions: 3
Compression:
Stored size: 785 Bytes
Contents
require "spec_helper" describe Arrthorizer::Privilege do subject(:privilege) { Arrthorizer::Privilege.new(name: "some privilege") } let(:role) { SomeGroup } let(:other_role) { AnotherGroup } describe :accessible_to? do context "when a Role was configured to have access to this privilege" do before :each do privilege.make_accessible_to(role) end context "and that Role is provided" do let(:arg) { role } it "returns true" do expect(privilege.accessible_to?(arg)).to be true end end context "and the name of that Role is provided" do let(:arg) { role.name } it "returns true" do expect(privilege.accessible_to?(arg)).to be true end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
arrthorizer-0.4.2 | spec/privilege/accessible_to_spec.rb |
arrthorizer-0.4.1 | spec/privilege/accessible_to_spec.rb |
arrthorizer-0.3.2 | spec/privilege/accessible_to_spec.rb |