Module: Proof::CoreExt::Object::Methods
Instance Method Summary collapse
Instance Method Details
#define_prove ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/proof/core_ext/object.rb', line 7 def define_prove ::Object.class_eval do def prove(&blk) obj_under_test = self Proof::Extend.into obj_under_test result = Proof::Execution.run Description.current, obj_under_test, blk result.write end end end |
#undefine_prove ⇒ Object
18 19 20 21 22 |
# File 'lib/proof/core_ext/object.rb', line 18 def undefine_prove ::Object.class_eval do undef :prove end end |