Sha256: 00ea6adfa983eb18477ac8fb854471931663d903abf7c459a0e7b71137792f65

Contents?: true

Size: 800 Bytes

Versions: 8

Compression:

Stored size: 800 Bytes

Contents

# encoding: utf-8
# File: env.rb


module DemoMacros4Cuke  # Use the module as a namespace

 
# Class created just for testing and demonstration purposes.
# Its instance, will record the output emitted by the steps.
class TracingWorld
  # Will contain the text emitted by the steps
  attr_reader(:trace_steps)
  
  
  def initialize()
    # Constructor  
    @trace_steps = []
  end
  
public
  # Write the given text to the error console
  def show(someText)
    # Replace every \" sequence by genuine "
    unescaped = someText.gsub(/\\"/, '"')
    $stderr.puts(unescaped)
  end

  
end # class

end # module

# For testing purpose we override the default Cucumber behaviour
# making our world object an instance of the TracingWorld class
World { DemoMacros4Cuke::TracingWorld.new }


# End of file

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
macros4cuke-0.3.32 examples/demo/features/support/env.rb
macros4cuke-0.3.30 examples/demo/features/support/env.rb
macros4cuke-0.3.29 examples/demo/features/support/env.rb
macros4cuke-0.3.28 examples/demo/features/support/env.rb
macros4cuke-0.3.27 examples/demo/features/support/env.rb
macros4cuke-0.3.26 examples/demo/features/support/env.rb
macros4cuke-0.3.25 examples/demo/features/support/env.rb
macros4cuke-0.3.24 examples/demo/features/support/env.rb