Skip to content

Commit fb5cb0d

Browse files
committed
added step to check for tag in multiple messages and bumped version
1 parent 1e4fad8 commit fb5cb0d

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jruby-1.7.24

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.3.0
1+
0.3.1

lib/agent_fix/cucumber.rb

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,26 @@ def anticipate_fix
143143

144144
expect(found).to be(true), "Message not included in FIX messages\n #{error_accum}"
145145
end
146+
147+
Then(/^the (?:fix|FIX) messages should include a message with(?: the tag)? "(.*)"$/) do |path|
148+
expect(@message_scope).not_to be_nil, "No message scope defined"
149+
150+
found = false
151+
error_accum = ""
152+
index = 1
153+
@message_scope.each do |m|
154+
@message = m
155+
begin
156+
steps %Q{
157+
When I inspect the #{index}th FIX message
158+
And the FIX message should have "#{path}"
159+
}
160+
found = true
161+
rescue Exception => e
162+
error_accum << "\n#{m.to_s.gsub!(/\001/, '|')}\n #{e}"
163+
end
164+
index += 1
165+
end
166+
167+
expect(found).to be(true), "Tag not included in FIX messages\n #{error_accum}"
168+
end

0 commit comments

Comments
 (0)