Sha256: e0141d7f884ebb90db7f1e3e0885785490f972930c84b6fdc8486dcdfffa366e

Contents?: true

Size: 588 Bytes

Versions: 13

Compression:

Stored size: 588 Bytes

Contents

require 'spec_helper'

describe Arrthorizer::ContextRole do
  describe :to_key do
    context "when the context role is not namespaced" do
      let(:role) { UnnamespacedContextRole.instance }

      it "returns a snake_cased version of the class name" do
        expect(role.to_key).to eql "UnnamespacedContextRole"
      end
    end

    context "when the context role is namespaced" do
      let(:role) { Namespaced::ContextRole.instance }

      specify "the namespace is taken into account" do
        expect(role.to_key).to eql "Namespaced::ContextRole"
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
arrthorizer-0.4.2 spec/context_role/to_key_spec.rb
arrthorizer-0.4.1 spec/context_role/to_key_spec.rb
arrthorizer-0.3.2 spec/context_role/to_key_spec.rb
arrthorizer-0.3.1 spec/context_role/to_key_spec.rb
arrthorizer-0.3.0 spec/context_role/to_key_spec.rb
arrthorizer-0.2.1 spec/context_role/to_key_spec.rb
arrthorizer-0.2.0 spec/context_role/to_key_spec.rb
arrthorizer-0.1.3 spec/context_role/to_key_spec.rb
arrthorizer-0.1.2 spec/context_role/to_key_spec.rb
arrthorizer-0.1.1 spec/context_role/to_key_spec.rb
arrthorizer-0.1.0 spec/context_role/to_key_spec.rb
arrthorizer-0.1.0.pre2 spec/context_role/to_key_spec.rb
arrthorizer-0.1.0.pre spec/context_role/to_key_spec.rb