Sha256: 5238a64b4143defca82637ec6c78479b5e363a8c5f5d90da48d3c9be6b29e51e
Contents?: true
Size: 584 Bytes
Versions: 5
Compression:
Stored size: 584 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, false) 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
5 entries across 5 versions & 1 rubygems