Module: Pbt
- Defined in:
- lib/pbt.rb,
lib/pbt/version.rb,
lib/pbt/check/case.rb,
lib/pbt/check/tosser.rb,
lib/pbt/check/property.rb,
lib/pbt/arbitrary/constant.rb,
lib/pbt/arbitrary/arbitrary.rb,
lib/pbt/check/configuration.rb,
lib/pbt/check/runner_methods.rb,
lib/pbt/reporter/run_details.rb,
lib/pbt/check/runner_iterator.rb,
lib/pbt/reporter/run_execution.rb,
lib/pbt/arbitrary/map_arbitrary.rb,
lib/pbt/arbitrary/array_arbitrary.rb,
lib/pbt/arbitrary/tuple_arbitrary.rb,
lib/pbt/arbitrary/choose_arbitrary.rb,
lib/pbt/arbitrary/filter_arbitrary.rb,
lib/pbt/arbitrary/one_of_arbitrary.rb,
lib/pbt/arbitrary/arbitrary_methods.rb,
lib/pbt/arbitrary/integer_arbitrary.rb,
lib/pbt/arbitrary/constant_arbitrary.rb,
lib/pbt/reporter/run_details_reporter.rb,
lib/pbt/arbitrary/fixed_hash_arbitrary.rb more...
Defined Under Namespace
Modules: Arbitrary, Check, Reporter Classes: InvalidConfiguration, PropertyFailure
Constant Summary collapse
- VERSION =
"0.5.0"
Class Method Summary collapse
-
.property(*args, **kwargs, &predicate) ⇒ Property
Create a property-based test with arbitraries.
Methods included from Arbitrary::ArbitraryMethods
alphanumeric_char, alphanumeric_string, array, ascii_char, ascii_string, boolean, char, choose, constant, date, fixed_hash, float, future_date, future_time, hash, hexa, hexa_string, integer, nat, nil, one_of, past_date, past_time, printable_ascii_char, printable_ascii_string, printable_char, printable_string, set, symbol, time, tuple
Methods included from Check::RunnerMethods
Methods included from Check::Tosser
Methods included from Check::ConfigurationMethods
Class Method Details
permalink .property(*args, **kwargs, &predicate) ⇒ Property
Create a property-based test with arbitraries. To run the test, pass the returned value to ‘Pbt.assert` method. Be aware that using both positional and keyword arguments is not supported.
42 43 44 45 |
# File 'lib/pbt.rb', line 42 def self.property(*args, **kwargs, &predicate) arb = to_arbitrary(args, kwargs) Check::Property.new(arb, &predicate) end |