Sha256: 09d106247f1fe9dc0a1378308bc9590a9fc5b3959e4c4bf5c44c1f2ef4a3506a
Contents?: true
Size: 732 Bytes
Versions: 2
Compression:
Stored size: 732 Bytes
Contents
require 'spec_helper' describe Tarquinn do let(:controller) { Tarquinn::DummyController.new } describe 'redirection' do context 'when configuration calls for a method that allows redirection' do it 'redirects to redirection path given by the method' do expect(controller).to receive(:redirect_to).with('/path') controller.parse_request end end context 'when redirection skip method returns true' do before do allow(controller).to receive(:should_skip_redirect?) { true } end it 'does not redirect to redirection path given by the method' do expect(controller).not_to receive(:redirect_to) controller.parse_request end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tarquinn-0.2.0 | spec/lib/tarquinn_spec.rb |
tarquinn-0.1.0 | spec/lib/tarquinn_spec.rb |