Sha256: 3c792c3bdf7d2271cdc76fc7b6ccacad6cb96d064d199b31f717bcf10c94dfc3

Contents?: true

Size: 542 Bytes

Versions: 145

Compression:

Stored size: 542 Bytes

Contents

require 'stringio'
require 'gherkin/formatter/pretty_formatter'
require 'gherkin/json_parser'

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, @formatter)
end

Given /^the following JSON is parsed:$/ do |text|
  @json_parser.parse(JSON.pretty_generate(JSON.parse(text)))
end

Then /^the outputted text should be:$/ do |expected_text|
  @io.string.strip.should == expected_text
end

Version data entries

145 entries across 142 versions & 8 rubygems

Version Path
candlepin-api-0.4.0 bundle/ruby/1.8/gems/gherkin-2.11.1/features/step_definitions/json_parser_steps.rb
candlepin-api-0.4.0 bundle/ruby/gems/gherkin-2.11.1/features/step_definitions/json_parser_steps.rb
candlepin-api-0.4.0 bundle/ruby/1.9.1/gems/gherkin-2.11.1/features/step_definitions/json_parser_steps.rb
librarian-puppet-0.9.9 vendor/gems/ruby/1.9.1/gems/gherkin-2.11.6/features/step_definitions/json_parser_steps.rb
librarian-puppet-0.9.8 vendor/gems/ruby/1.9.1/gems/gherkin-2.11.6/features/step_definitions/json_parser_steps.rb
gherkin-2.11.6 features/step_definitions/json_parser_steps.rb
gherkin-2.11.6-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.6-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.6-java features/step_definitions/json_parser_steps.rb
gherkin-2.11.5 features/step_definitions/json_parser_steps.rb
gherkin-2.11.5-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.5-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.5-java features/step_definitions/json_parser_steps.rb
gherkin-2.11.4 features/step_definitions/json_parser_steps.rb
gherkin-2.11.4-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.4-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.4-java features/step_definitions/json_parser_steps.rb
gherkin-2.11.3 features/step_definitions/json_parser_steps.rb
gherkin-2.11.3-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.11.3-x86-mingw32 features/step_definitions/json_parser_steps.rb