method
execute
1.2.8 -
Show latest stable
- Class:
Spec::Example::ExampleMethods
execute(run_options, instance_variables)public
No documentation available.
# File lib/spec/example/example_methods.rb, line 32
def execute(run_options, instance_variables) # :nodoc:
run_options.reporter.example_started(@_proxy)
set_instance_variables_from_hash(instance_variables)
execution_error = nil
Timeout.timeout(run_options.timeout) do
begin
before_each_example
instance_eval(&@_implementation)
rescue Exception => e
execution_error ||= e
end
begin
after_each_example
rescue Exception => e
execution_error ||= e
end
end
run_options.reporter.example_finished(@_proxy.update(description), execution_error)
success = execution_error.nil? || ExamplePendingError === execution_error
end