Skip to content

Commit

Permalink
Merge pull request #395 from deepj/fix-typo-gherkin-formatter-adapter
Browse files Browse the repository at this point in the history
Fix typo in variable in Gherkin Formatter Adapter
  • Loading branch information
os97673 committed Mar 15, 2013
2 parents b06086b + a3d96d4 commit cc4783f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/cucumber/formatter/gherkin_formatter_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ module Formatter
# Adapts Cucumber formatter events to Gherkin formatter events
# This class will disappear when Cucumber is based on Gherkin's model.
class GherkinFormatterAdapter
def initialize(gherkin_formatter, print_emtpy_match)
def initialize(gherkin_formatter, print_empty_match)
@gf = gherkin_formatter
@print_emtpy_match = print_emtpy_match
@print_empty_match = print_empty_match
end

def before_feature(feature)
Expand Down Expand Up @@ -36,7 +36,7 @@ def before_feature_element(feature_element)

def before_step(step)
@gf.step(step.gherkin_statement)
if @print_emtpy_match
if @print_empty_match
if(@outline)
match = Gherkin::Formatter::Model::Match.new(step.gherkin_statement.outline_args, nil)
else
Expand All @@ -51,7 +51,7 @@ def before_step_result(keyword, step_match, multiline_arg, status, exception, so
arguments = step_match.step_arguments.map{|a| Gherkin::Formatter::Argument.new(a.offset, a.val)}
location = step_match.file_colon_line
match = Gherkin::Formatter::Model::Match.new(arguments, location)
if @print_emtpy_match
if @print_empty_match
# Trick the formatter to believe that's what was printed previously so we get arg highlights on #result
@gf.instance_variable_set('@match', match)
else
Expand Down

0 comments on commit cc4783f

Please sign in to comment.