Sha256: 71770bd07eef77103b3cdb281d06f93a594a5b4a41077929214059f608ebee7d

Contents?: true

Size: 549 Bytes

Versions: 50

Compression:

Stored size: 549 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)
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

50 entries across 50 versions & 3 rubygems

Version Path
resque-pool-0.3.0 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/features/step_definitions/json_parser_steps.rb
resque-pool-0.3.0.beta.2 vendor/bundle/ruby/1.8/gems/gherkin-2.3.3/features/step_definitions/json_parser_steps.rb
gherkin-2.4.1 features/step_definitions/json_parser_steps.rb
gherkin-2.4.1-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.4.1-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.4.1-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.4.1-java features/step_definitions/json_parser_steps.rb
gherkin-2.4.0 features/step_definitions/json_parser_steps.rb
gherkin-2.4.0-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.4.0-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.4.0-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.4.0-java features/step_definitions/json_parser_steps.rb
gherkin-2.3.10-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.10-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.10-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.3.10-java features/step_definitions/json_parser_steps.rb
gherkin-2.3.9-x86-mswin32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.9-x86-mingw32 features/step_definitions/json_parser_steps.rb
gherkin-2.3.9-universal-dotnet features/step_definitions/json_parser_steps.rb
gherkin-2.3.9-java features/step_definitions/json_parser_steps.rb