lib/lucid/ast/tdl_walker.rb in lucid-0.0.9 vs lib/lucid/ast/tdl_walker.rb in lucid-0.1.0
- old
+ new
@@ -6,17 +6,10 @@
def initialize(runtime, listeners = [], configuration = Lucid::Configuration.default)
@runtime, @listeners, @configuration = runtime, listeners, configuration
end
- def execute(scenario, skip_hooks)
- runtime.with_hooks(scenario, skip_hooks) do
- scenario.skip_invoke! if scenario.failed?
- scenario.steps.accept(self)
- end
- end
-
# This is being used to forward on messages from the AST to
# the formatters. This is being done in lieu of the explicit
# forwarding that was previously done.
def method_missing(message, *args, &block)
broadcast_message(message, *args, &block)
@@ -35,9 +28,10 @@
broadcast_message message, *args, &block
self
end
def broadcast_message(message, *args, &block)
+ return self if Lucid.wants_to_quit
message = message.to_s.gsub('visit_', '')
if block_given?
send_to_all("before_#{message}", *args)
yield if block_given?
send_to_all("after_#{message}", *args)