Sha256: 9431235432a323e14913df17d64be7242b5ac259d1777d3cd9e9b93343315b95

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper'

describe Message::Recorder::Chain do
  
  before do
    @recorder = Message::Recorder.new
  end
  
  it "should record" do
    chain = Message::Recorder::Chain.new
    chain.record_message(:downcase)
    chain.record_message(:+, " world")
    
    chain.size.should be_eql(2)
    chain.send_to("HELLO",@recorder).should be_eql("hello world")
  end
  
  it "should dup properly" do
    chain = Message::Recorder::Chain.new
    chain.record_message(:downcase)
    chain.record_message(:+, " world")
    
    chain.dup.should be_eql(chain)
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
message-recorder-1.0.4 spec/chain_spec.rb