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

Version Path
vim-jar-0.1.2.0001 bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/json_parser_steps.rb
vim-jar-0.1.2 bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/json_parser_steps.rb
vim-jar-0.1.1 bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/json_parser_steps.rb
vim-jar-0.1.0 bundler/ruby/1.8/gems/gherkin-2.2.9/features/step_definitions/json_parser_steps.rb
gherkin-2.3.1 features/step_definitions/json_parser_steps.rb
gherkin-2.3.1-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.1-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.1-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.3.1-java features/step_definitions/json_parser_steps.rb
gherkin-2.3.0 features/step_definitions/json_parser_steps.rb
gherkin-2.3.0-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.0-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.0-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.3.0-java features/step_definitions/json_parser_steps.rb
gherkin-2.2.9 features/step_definitions/json_parser_steps.rb
gherkin-2.2.9-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.2.9-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.2.9-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.2.9-java features/step_definitions/json_parser_steps.rb