Sha256: 487f20940c8c5b110c163ba95080a308c1b54e773c90da27c7892d8772c9d4ca

Contents?: true

Size: 523 Bytes

Versions: 8

Compression:

Stored size: 523 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Dispatcher::Action, '#call' do

  subject { object.call(request) }

  let(:object)   { described_class.new(klass, observer) }
  let(:klass)    { mock }
  let(:observer) { mock }
  let(:request)  { Request.new(env, input) }
  let(:env)      { mock }
  let(:input)    { mock }
  let(:response) { mock }

  before do
    klass.should_receive(:call).with(request).and_return(response)
    observer.should_receive(:call).with(response)
  end

  it { should eql(response) }
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
substation-0.0.8 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.7 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.6 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.5 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.4 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.3 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.2 spec/unit/substation/dispatcher/action/call_spec.rb
substation-0.0.1 spec/unit/substation/dispatcher/action/call_spec.rb