module MimiCheck::RSpecHelper
Public Instance Methods
check(prop, gens = nil)
click to toggle source
# File lib/mimicheck/rspec_helper.rb, line 3 def check(prop, gens = nil) gens = Array(gens || generators) result = checker_for(prop).check(gens) expect(result).to eq(MimiCheck::Result::Success.new(prop)) end
check_with_examples(prop, exs = nil)
click to toggle source
# File lib/mimicheck/rspec_helper.rb, line 10 def check_with_examples(prop, exs = nil) exs = Array(exs || examples) result = checker_for(prop).check_examples(exs) expect(result).to eq(MimiCheck::Result::Success.new(prop)) end
examples()
click to toggle source
# File lib/mimicheck/rspec_helper.rb, line 21 def examples fail 'You must define a list of examples with let(:examples) { ... }' end
generators()
click to toggle source
# File lib/mimicheck/rspec_helper.rb, line 17 def generators fail 'You must define a list of generators with let(:generators) { ... }' end
trials()
click to toggle source
# File lib/mimicheck/rspec_helper.rb, line 25 def trials MimiCheck.trials end
Private Instance Methods
checker_for(prop, trls = trials)
click to toggle source
# File lib/mimicheck/rspec_helper.rb, line 31 def checker_for(prop, trls = trials) MimiCheck::Checker.for(prop).with(trials: trls) end