Module: PigSpec

Defined in:
lib/pigspec.rb,
lib/pigspec/version.rb,
lib/pigspec/javabridge.rb

Overview

A testing framework for pig

Defined Under Namespace

Classes: JavaBridge, JavaPigTest, Test

Constant Summary collapse

VERSION =
'0.0.5'

Class Method Summary collapse

Class Method Details

.pig(pig_path = File.join(ENV['PIG_HOME'], 'pig.jar'), pigunit_path = File.join(ENV['PIG_HOME'], 'pigunit.jar'), options = { 'file.encoding' => 'UTF-8' }, &block) ⇒ Object



100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/pigspec.rb', line 100

def pig(
  pig_path = File.join(ENV['PIG_HOME'], 'pig.jar'),
  pigunit_path = File.join(ENV['PIG_HOME'], 'pigunit.jar'),
  options = { 'file.encoding' => 'UTF-8' }, &block
)
  test = Test.new
  test.setup(pig_path, pigunit_path, options)
  test.evaluate(&block)
  result = test.run
  test.shutdown
  result
end