We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Ruby doesn't supply an :implies method, but I find it useful for certain kinds of assertions. Here's a possible implementation:
class FalseClass def implies(consequent=false) true end end class NilClass def implies(consequent=false) true end end class Object def implies(consequent=false) if block_given? yield else consequent end end end
(client.rich?).implies(client.money > LOTS) (! expression.reducible?).implies { expect { expression.reduce() }.to raise_error }