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.7'

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 = ['-Dfile.encoding=UTF-8'], &block) ⇒ Object



115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/pigspec.rb', line 115

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