Sha256: f4ccbe4c0df410392fc9f74c4b70d3b81345e87c9f868e194544067fb389d16b

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 Bytes

Contents

require 'spec_helper'

describe EventAggregator::MessageJob do
	let(:callback)    { lambda{ |data| } }
	let(:data)        { Faker::Name.name }
	let(:message_job) { EventAggregator::MessageJob.new }

	describe '.perform' do
		describe 'legal parameters' do
			it 'excute callback with data' do
				expect(callback).to receive(:call).with(data)
				
				message_job.perform(data, callback)
			end
		end
		describe 'illegal parameters' do
			it 'should never be passed to MessageJob' do
				expect(true).to eq(true)
			end
		end
	end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
event_aggregator-1.1.5 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.1.4.pre.pre spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.1.4 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.1.3 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.1.2 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.1.1 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.1.0 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.0.2 spec/lib/event_aggregator/message_job_spec.rb
event_aggregator-1.0.1 spec/lib/event_aggregator/message_job_spec.rb