Sha256: 9ce9f5714bae58727c65938e1b75ca9e6fecfbfd6246598a72750286acea322e

Contents?: true

Size: 547 Bytes

Versions: 6

Compression:

Stored size: 547 Bytes

Contents

require "spec_helper"

describe Arrthorizer::Rails::ControllerConcern do
  let(:controller_class) { Class.new(SomeController) }
  let(:controller) { controller_class.new }

  before :each do
    controller_class.to_prepare_context do |c|
      c.defaults do
        params
      end
    end

    controller.stub(:request).and_return(ActionDispatch::TestRequest.new)
  end

  describe :arrthorizer_context do
    it "returns an Arrthorizer::Context" do
      controller.send(:arrthorizer_context).should be_a Arrthorizer::Context
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
arrthorizer-0.1.3 spec/rails/controller_concern/arrthorizer_context_spec.rb
arrthorizer-0.1.2 spec/rails/controller_concern/arrthorizer_context_spec.rb
arrthorizer-0.1.1 spec/rails/controller_concern/arrthorizer_context_spec.rb
arrthorizer-0.1.0 spec/rails/controller_concern/arrthorizer_context_spec.rb
arrthorizer-0.1.0.pre2 spec/rails/controller_concern/arrthorizer_context_spec.rb
arrthorizer-0.1.0.pre spec/rails/controller_concern/arrthorizer_context_spec.rb