Class: Proof::Execution
- Inherits:
-
Object
- Object
- Proof::Execution
- Includes:
- Initializer
- Defined in:
- lib/proof/execution.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.run(description, obj_under_test, blk) ⇒ Object
7 8 9 10 |
# File 'lib/proof/execution.rb', line 7 def self.run(description, obj_under_test, blk) instance = new description, obj_under_test, blk instance.run end |
Instance Method Details
#run ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/proof/execution.rb', line 12 def run error = nil begin result = obj_under_test.instance_eval &blk status = result ? :pass : :fail rescue => error status = :error end Proof::Result.new description, status, error end |