Class: Spec::Runner::Specification

Inherits:
Object
  • Object
show all
Defined in:
lib/interpose/lib/spec/runner/specification.rb

Instance Method Summary collapse

Instance Method Details

#execute_spec(execution_context, errors) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/interpose/lib/spec/runner/specification.rb', line 4

def execute_spec(execution_context, errors)
  begin
    Spec::Expectations::clear_errors
    execution_context.instance_eval(&spec_block)
    Spec::Expectations::first_error
    return true
  rescue Exception => e
    errors << e
    return false
  end
end