Module: RushCheck

Defined in:
lib/rushcheck/guard.rb,
lib/rushcheck/gen.rb,
lib/rushcheck/bool.rb,
lib/rushcheck/claim.rb,
lib/rushcheck/config.rb,
lib/rushcheck/random.rb,
lib/rushcheck/result.rb,
lib/rushcheck/version.rb,
lib/rushcheck/property.rb,
lib/rushcheck/testable.rb,
lib/rushcheck/arbitrary.rb,
lib/rushcheck/assertion.rb,
lib/rushcheck/testresult.rb,
lib/rushcheck/testoptions.rb

Overview

testoptions.rb

define class TestOptions for a batch process for RushCheck

Defined Under Namespace

Modules: Arbitrary, Coarbitrary, HsRandom, RandomBool, RandomGen, Testable Classes: Assertion, Claim, Config, Gen, GuardException, Property, Result, StdGen, TestExausted, TestFailed, TestOk, TestOptions, TestResult, TheStdGen

Constant Summary collapse

VERSION =
"0.8"

Class Method Summary collapse

Class Method Details

.guardObject



8
9
10
# File 'lib/rushcheck/guard.rb', line 8

def guard
  raise RushCheck::GuardException unless yield
end

.guard_raise(c) ⇒ Object



12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/rushcheck/guard.rb', line 12

def guard_raise(c)
  begin
    yield
  rescue Exception => ex
    case ex
    when c
      raise RushCheck::GuardException
    else
      raise ex
    end
  end
end