Sha256: 95517a61586cfe89f077193f4b3ea9f1534430b08ae6989b77421a01c9b7409b

Contents?: true

Size: 598 Bytes

Versions: 1

Compression:

Stored size: 598 Bytes

Contents

require 'spec_helper'

describe Waffle::Event do
  describe '.occured' do
    let(:flow){'event'}
    let(:now){Time.now}
    
    before do
      Time.stub(:now => now)
      Waffle.should_receive(:publish).with(flow, message)
    end
    
    context do
      let(:message){{"key1" => "value1", "key2" => "value2", "occured_at" => now}}
      specify{Waffle::Event.occured(flow, {'key1' => 'value1', 'key2' => 'value2'})}
    end
    
    context do
      let(:message){{"body" => "message data", "occured_at" => now}}
      specify{Waffle::Event.occured(flow, 'message data')}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
waffle-0.4.0 spec/waffle/event_spec.rb