|
23 | 23 | msg
|
24 | 24 | end
|
25 | 25 | expect(queue.first.get('message')).to eql(message)
|
26 |
| - expect(queue.first.get('jms_destination')).to_not be_nil |
27 |
| - expect(queue.first.get('jms_timestamp')).to_not be_nil |
28 |
| - expect(queue.first.get('this')).to be_nil |
29 |
| - expect(queue.first.get('that')).to be_nil |
30 |
| - expect(queue.first.get('the_other')).to eql('the_other_prop') |
| 26 | + expect(queue.first).to have_header('jms_destination') |
| 27 | + expect(queue.first).to have_header('jms_timestamp') |
| 28 | + expect(queue.first).not_to have_property('this') |
| 29 | + expect(queue.first).not_to have_property('this') |
| 30 | + expect(queue.first).to have_property_value('the_other', 'the_other_prop') |
31 | 31 | end
|
32 | 32 | end
|
33 | 33 |
|
|
45 | 45 | msg
|
46 | 46 | end
|
47 | 47 | expect(queue.first.get('message')).to eql(message)
|
48 |
| - expect(queue.first.get('this')).to eql(4) |
49 |
| - expect(queue.first.get('that')).to eql('that_prop') |
| 48 | + expect(queue.first).to have_property_value('this', 4) |
| 49 | + expect(queue.first).to have_property_value('that', 'that_prop') |
50 | 50 | end
|
51 | 51 |
|
52 | 52 | it 'does not process messages that do not conform to the message selector' do
|
|
71 | 71 | msg
|
72 | 72 | end
|
73 | 73 | expect(queue.first.get('message')).to eql(message)
|
74 |
| - expect(queue.first.get('this')).to eql(3) |
75 |
| - expect(queue.first.get('that')).to eql('that_prop') |
| 74 | + expect(queue.first).to have_property_value('this', 3) |
| 75 | + expect(queue.first).to have_property_value('that', 'that_prop') |
76 | 76 | end
|
77 | 77 |
|
78 | 78 | it 'does not process messages that do not conform to the message selector' do
|
|
97 | 97 | msg
|
98 | 98 | end
|
99 | 99 | expect(queue.first.get('message')).to eql(message)
|
100 |
| - expect(queue.first.get('this')).to be_within(0.001).of(3.1) |
101 |
| - expect(queue.first.get('that')).to eql('that_prop') |
| 100 | + expect(get_property_value(queue.first, 'this')).to be_within(0.001).of(3.1) |
| 101 | + expect(queue.first).to have_property_value('that', 'that_prop') |
102 | 102 | end
|
103 | 103 |
|
104 | 104 | it 'does not process messages that do not conform to the message selector' do
|
|
124 | 124 | msg
|
125 | 125 | end
|
126 | 126 | expect(queue.first.get('message')).to eql(message)
|
127 |
| - expect(queue.first.get('this')).to eql('this_prop') |
128 |
| - expect(queue.first.get('that')).to eql('that_prop') |
| 127 | + expect(queue.first).to have_property_value('this', 'this_prop') |
| 128 | + expect(queue.first).to have_property_value('that', 'that_prop') |
129 | 129 | end
|
130 | 130 |
|
131 | 131 | it 'does not process messages that do not conform to the message selector' do
|
|
154 | 154 | msg
|
155 | 155 | end
|
156 | 156 | expect(queue.first.get('message')).to eql(message)
|
157 |
| - expect(queue.first.get('jms_destination')).to be_nil |
158 |
| - expect(queue.first.get('jms_timestamp')).to_not be_nil |
159 |
| - expect(queue.first.get('this')).to eq('this_prop') |
160 |
| - expect(queue.first.get('that')).to eq('that_prop') |
161 |
| - expect(queue.first.get('the_other')).to eq('the_other_prop') |
| 157 | + expect(queue.first).not_to have_header('jms_destination') |
| 158 | + expect(queue.first).to have_header('jms_timestamp') |
| 159 | + expect(queue.first).to have_property_value('this', 'this_prop') |
| 160 | + expect(queue.first).to have_property_value('that', 'that_prop') |
| 161 | + expect(queue.first).to have_property_value('the_other', 'the_other_prop') |
162 | 162 | end
|
163 | 163 | end
|
164 | 164 |
|
|
293 | 293 | end
|
294 | 294 | expect(queue.size).to eql 1
|
295 | 295 | expect(queue.first.get('message')).to eql 'hello world'
|
296 |
| - expect(queue.first.get("jms_destination")).to eql(destination) |
| 296 | + expect(queue.first).to have_header_value("jms_destination", destination) |
297 | 297 | end
|
298 | 298 | end
|
299 | 299 | end
|
|
0 commit comments