Sha256: a41c0203067b07f3c56c27d7db31460c5a9eade1f9d29e0e8d544cc3d2faa769
Contents?: true
Size: 577 Bytes
Versions: 19
Compression:
Stored size: 577 Bytes
Contents
require 'stringio' require 'gherkin/formatter/pretty_formatter' require 'gherkin/json_parser' World(Gherkin::Formatter::Colors) Given /^a PrettyFormatter$/ do @io = StringIO.new @formatter = Gherkin::Formatter::PrettyFormatter.new(@io, true) end Given /^a JSON lexer$/ do @json_parser = Gherkin::JSONParser.new(@formatter) end Given /^the following JSON is parsed:$/ do |text| @json_parser.parse(JSON.pretty_generate(JSON.parse(text)), "unknown.json", 0) end Then /^the outputted text should be:$/ do |expected_text| @io.string.strip.should == expected_text end
Version data entries
19 entries across 19 versions & 2 rubygems