Sha256: 747f41b9ddb306d756b7f887c5a0ee1056d511ab85c50655e53f188c017c6c22

Contents?: true

Size: 871 Bytes

Versions: 81

Compression:

Stored size: 871 Bytes

Contents

require 'test_helper'

module Vedeu

  describe ApplicationController do

    let(:described) { Vedeu::ApplicationController }
    let(:instance)  { described.new(params) }
    let(:params)    { {} }

    describe '#initialize' do
      subject { instance }

      it { subject.must_be_instance_of(described) }
      it { subject.instance_variable_get('@params').must_equal(params) }
    end

    describe '#redirect_to' do
      let(:controller) {}
      let(:action)     {}
      let(:params)     { {} }

      before { Vedeu.stubs(:trigger) }

      subject { instance.redirect_to(controller, action, params) }

      it {
        Vedeu.expects(:trigger).with(:_goto_, controller, action, params)
        subject
      }

      it { instance.must_respond_to(:redirect) }
      it { instance.must_respond_to(:goto) }
    end

  end # ApplicationController

end # Vedeu

Version data entries

81 entries across 81 versions & 1 rubygems

Version Path
vedeu-0.6.30 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.29 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.28 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.27 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.26 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.25 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.24 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.23 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.22 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.21 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.20 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.19 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.18 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.17 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.16 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.15 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.14 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.13 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.12 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.11 test/lib/vedeu/application/application_controller_test.rb