Skip to content

Instantly share code, notes, and snippets.

@tobias
Forked from jcrossley3/messaging_spec.rb
Created May 28, 2011 02:04
Show Gist options
  • Save tobias/996515 to your computer and use it in GitHub Desktop.
Save tobias/996515 to your computer and use it in GitHub Desktop.
[
[true, 'prop = true'],
[true, 'prop <> false'],
[5, 'prop = 5'],
[5, 'prop > 4'],
[5.5, 'prop = 5.5'],
[5.5, 'prop < 6'],
['string', "prop = 'string'"]
].each do |value, selector|
it "should be able to select with property set to #{value} using selector '#{selector}'" do
@queue.publish value.to_s, :properties => { :prop => value }
message = @queue.receive(:timeout => 1000, :selector => selector)
message.should == value.to_s
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment