class Proof::Execution

Public Class Methods

run(description, obj_under_test, blk) click to toggle source
# 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

Public Instance Methods

run() click to toggle source
# 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