Sha256: 348fd6485b53bf402cfd06498ae01d8e76a1cae3e1fe34b40bd66c41d43ba6cc

Contents?: true

Size: 555 Bytes

Versions: 3

Compression:

Stored size: 555 Bytes

Contents

require 'spec_helper'

class MyController
  include Controll::Enabler

  # Mocking!
  def render path
    path
  end
  alias_method :redirect_to, :render  
end

describe Controll::Enabler do
  subject { controller.new }
  let(:controller) { MyController }

  context 'instance' do
    describe 'do_redirect' do
      specify do
        expect { subject.do_redirect }.to raise_error(ArgumentError)
      end
    end

    describe 'do_render' do
      specify do
        expect { subject.do_render }.to raise_error(ArgumentError)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
controll-0.3.2 spec/controll/enabler_spec.rb
controll-0.3.1 spec/controll/enabler_spec.rb
controll-0.3.0 spec/controll/enabler_spec.rb