Last active
December 20, 2015 18:58
-
-
Save FrancescaK/6179564 to your computer and use it in GitHub Desktop.
Step Definitions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Given /^an IO stream containing ([0-9a-fA-F]+)$/ do |hex_bytes| | |
@io = StringIO.new([hex_bytes].pack('H*')) | |
end | |
When /^I deserialize the stream$/ do | |
@document = Hash.from_bson(@io) | |
end | |
Then /^the result should be the ((?:\S+) value (?:\S+))$/ do |value| | |
@document['k'].should eq(value) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment