Sha256: 047272c07aa6408ee0003bd27bfdbf4aaf41a3e2c40fdd1815b4cb152019513b

Contents?: true

Size: 438 Bytes

Versions: 11

Compression:

Stored size: 438 Bytes

Contents

require "spec_helper"

describe Arrthorizer::Rails::ControllerAction do
  describe :to_key do
    let(:controller) { "forum/topics" }
    let(:action) { "create" }

    subject(:controller_action) { Arrthorizer::Rails::ControllerAction.new(controller: controller, action: action) }

    it "joins controller and action into a 'hash shorthand'" do
      expect(controller_action.to_key).to eql("#{controller}##{action}")
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

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