Skip to content

Commit

Permalink
Don't pollute RbWorld with the AnsiEscapes methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Empact committed Feb 7, 2012
1 parent b7d7e97 commit 50fedc1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cucumber/rb_support/rb_world.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Cucumber
module RbSupport
# All steps are run in the context of an object that extends this module.
module RbWorld
include Gherkin::Formatter::AnsiEscapes
AnsiEscapes = Gherkin::Formatter::AnsiEscapes

class << self
def alias_adverb(adverb)
Expand All @@ -21,7 +21,7 @@ def Transform(arg)
attr_writer :__cucumber_step_mother, :__natural_language

def __cucumber_invoke(name, multiline_argument=nil) #:nodoc:
STDERR.puts failed + "WARNING: Using 'Given/When/Then' in step definitions is deprecated, use 'step' to call other steps instead:" + caller[0] + reset
STDERR.puts AnsiEscapes.failed + "WARNING: Using 'Given/When/Then' in step definitions is deprecated, use 'step' to call other steps instead:" + caller[0] + AnsiEscapes.reset
@__cucumber_step_mother.invoke(name, multiline_argument)
end

Expand All @@ -46,7 +46,7 @@ def doc_string(string_with_triple_quotes, file=nil, line_offset=0)
end

def announce(*messages)
STDERR.puts failed + "WARNING: #announce is deprecated. Use #puts instead:" + caller[0] + reset
STDERR.puts AnsiEscapes.failed + "WARNING: #announce is deprecated. Use #puts instead:" + caller[0] + AnsiEscapes.reset
puts(*messages)
end

Expand Down

0 comments on commit 50fedc1

Please sign in to comment.