class Cucumber::Value::ValueTester
@author Colin Humphreys
Public Class Methods
new(test)
click to toggle source
Initialises the ValueTester
@param [String] test the code block to be executed for the value test
# File lib/cucumber/value/value_tester.rb, line 7 def initialize(test) @test = test end
Public Instance Methods
run_test()
click to toggle source
Runs the test block
# File lib/cucumber/value/value_tester.rb, line 11 def run_test begin @value = eval @test rescue Exception => exc # TODO: something sensible when tests aren't valid @value = false end end
value?()
click to toggle source
Getter for whether the value has been delivered @return [Boolean] has the test passed?
# File lib/cucumber/value/value_tester.rb, line 21 def value? @value end