Class: Cog::SpecHelpers::Invocation

Inherits:
Object
  • Object
show all
Defined in:
lib/code_node/spec_helpers/runner.rb

Instance Method Summary collapse

Instance Method Details

#exec(&block) ⇒ Object

Redefine exec for testing code_node



16
17
18
19
20
21
# File 'lib/code_node/spec_helpers/runner.rb', line 16

def exec(&block)
  ENV['COG_TOOLS'] = File.expand_path File.join(File.dirname(__FILE__), '..', 'cog_tool.rb')
  Open3.popen3 *@cmd do |i,o,e,t|
    block.call i,o,e
  end
end