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.71 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.70 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.69 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.68 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.67 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.66 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.65 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.64 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.63 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.62 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.61 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.60 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.59 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.58 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.57 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.56 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.54 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.53 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.52 test/lib/vedeu/application/application_controller_test.rb
vedeu-0.6.51 test/lib/vedeu/application/application_controller_test.rb