Sha256: 7f7e2ca3040c8c0e963ef4f546065ada33b38204a15eb814961b090dc7a9aa60

Contents?: true

Size: 577 Bytes

Versions: 13

Compression:

Stored size: 577 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe Praxis::Controller do
  subject do
    Class.new do
      include Praxis::Controller

      implements PeopleResource

      before :validate, actions: [:index] do
        'before'
      end

      before actions: [:show] do
      end

      after :response, actions: [:show] do
        'after'
      end

      def index; end

      def show; end
    end
  end

  context '.implements' do
    it 'set the resource definition controller' do
      expect(subject).to eq(PeopleResource.controller)
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
praxis-2.0.pre.31 spec/praxis/controller_spec.rb
praxis-2.0.pre.30 spec/praxis/controller_spec.rb
praxis-2.0.pre.29 spec/praxis/controller_spec.rb
praxis-2.0.pre.28 spec/praxis/controller_spec.rb
praxis-2.0.pre.27 spec/praxis/controller_spec.rb
praxis-2.0.pre.26 spec/praxis/controller_spec.rb
praxis-2.0.pre.25 spec/praxis/controller_spec.rb
praxis-2.0.pre.24 spec/praxis/controller_spec.rb
praxis-2.0.pre.23 spec/praxis/controller_spec.rb
praxis-2.0.pre.22 spec/praxis/controller_spec.rb
praxis-2.0.pre.21 spec/praxis/controller_spec.rb
praxis-2.0.pre.20 spec/praxis/controller_spec.rb
praxis-2.0.pre.19 spec/praxis/controller_spec.rb