lib/cucumber/formatter/gherkin_formatter_adapter.rb in cucumber-1.2.5 vs lib/cucumber/formatter/gherkin_formatter_adapter.rb in cucumber-1.3.0
- old
+ new
@@ -4,13 +4,13 @@
module Cucumber
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)
@gf.uri(feature.file)
@gf.feature(feature.gherkin_statement)
@@ -34,11 +34,11 @@
end
end
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
match = Gherkin::Formatter::Model::Match.new([], nil)
end
@@ -49,10 +49,10 @@
def before_step_result(keyword, step_match, multiline_arg, status, exception, source_indent, background, file_colon_line)
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
@gf.match(match)
end