Sha256: 2193604ae6fe9e93d64d8f0fa261b55bcdf0efdb8e033f3f12bfcb39f7e54a43

Contents?: true

Size: 446 Bytes

Versions: 5

Compression:

Stored size: 446 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Visitable, '#accept' do
  subject { object.accept(visitor) }

  let(:described_class) { Class.new { include Visitable } }
  let(:visitor)         { mock('Visitor', :visit => nil)  }
  let(:object)          { described_class.new             }

  it_should_behave_like 'a command method'

  it 'sends self to visitor#visit' do
    visitor.should_receive(:visit).with(object)
    subject
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/visitable/accept_spec.rb
veritas-0.0.7 spec/unit/veritas/visitable/accept_spec.rb
veritas-0.0.6 spec/unit/veritas/visitable/accept_spec.rb
veritas-0.0.5 spec/unit/veritas/visitable/accept_spec.rb
veritas-0.0.4 spec/unit/veritas/visitable/accept_spec.rb