Permalink
Browse files

Don't pollute RbWorld with the AnsiEscapes methods

  • Loading branch information...
1 parent b7d7e97 commit 50fedc1e45a99b3b623ed8b31fd656e5e2a6ad6e @Empact committed Feb 7, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/cucumber/rb_support/rb_world.rb
View
6 lib/cucumber/rb_support/rb_world.rb
@@ -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)
@@ -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
@@ -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

0 comments on commit 50fedc1

Please sign in to comment.