Sha256: e603eb805ce7e38192a73e8a859673b5423227afc0c44c42f4501f7135629c07

Contents?: true

Size: 656 Bytes

Versions: 13

Compression:

Stored size: 656 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

module Adhearsion
  class Router
    describe EventedRoute do
      let(:name) { 'catchall' }

      subject { Route.new name }

      before { subject.extend described_class }

      it { should be_evented }

      describe "dispatching a call" do
        let(:call) { Call.new }

        context "via a block" do
          subject :route do
            Route.new 'foobar' do |c|
              c.foo
            end
          end

          it "should yield the call to the block" do
            call.should_receive(:foo).once
            route.dispatch call
          end
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
adhearsion-2.5.4 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.5.3 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.5.2 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.5.0 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.4.0 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.4.0.beta3 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.4.0.beta2 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.4.0.beta1 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.3.5 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.3.4 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.3.3 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.3.2 spec/adhearsion/router/evented_route_spec.rb
adhearsion-2.3.1 spec/adhearsion/router/evented_route_spec.rb