Sha256: 268a3aed106adce261c4efecc5bf7fe5d1da71bd2aeeae90a4dd07c9bbccb11a

Contents?: true

Size: 610 Bytes

Versions: 11

Compression:

Stored size: 610 Bytes

Contents

require "spec_helper"

describe Arrthorizer::Rails::ControllerAction do
  describe :key_for do
    context "when the controller lives in a separate namespace" do
      let(:controller_path) { 'namespace/controller_name' }
      let(:controller_path_regex) { %r(#{controller_path}) }
      let(:controller) { double('some_controller', controller_path: controller_path, action_name: 'some_action') }

      specify "that namespace is made part of the key" do
        key = Arrthorizer::Rails::ControllerAction.key_for(controller)

        expect(key).to match(%r(#{controller_path}))
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
arrthorizer-0.3.2 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.3.1 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.3.0 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.2.1 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.2.0 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.1.3 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.1.2 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.1.1 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.1.0 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.1.0.pre2 spec/rails/controller_action/key_for_spec.rb
arrthorizer-0.1.0.pre spec/rails/controller_action/key_for_spec.rb