Module: Cucumber::Core

Defined in:
lib/cucumber/core.rb,
lib/cucumber/core/event.rb,
lib/cucumber/core/events.rb,
lib/cucumber/core/filter.rb,
lib/cucumber/core/version.rb,
lib/cucumber/core/compiler.rb,
lib/cucumber/core/test/tag.rb,
lib/cucumber/core/event_bus.rb,
lib/cucumber/core/test/case.rb,
lib/cucumber/core/test/step.rb,
lib/cucumber/core/test/timer.rb,
lib/cucumber/core/test/action.rb,
lib/cucumber/core/test/result.rb,
lib/cucumber/core/test/runner.rb,
lib/cucumber/core/test/location.rb,
lib/cucumber/core/gherkin/parser.rb,
lib/cucumber/core/gherkin/writer.rb,
lib/cucumber/core/report/summary.rb,
lib/cucumber/core/test/data_table.rb,
lib/cucumber/core/test/doc_string.rb,
lib/cucumber/core/gherkin/document.rb,
lib/cucumber/core/test/around_hook.rb,
lib/cucumber/core/gherkin/writer/helpers.rb,
lib/cucumber/core/test/filters/tag_filter.rb,
lib/cucumber/core/test/filters/name_filter.rb,
lib/cucumber/core/test/empty_multiline_argument.rb,
lib/cucumber/core/test/filters/locations_filter.rb,
lib/cucumber/core/test/filters/activate_steps_for_self_test.rb

Defined Under Namespace

Modules: Events, Filter, Gherkin, Report, Test Classes: Compiler, Event, EventBus, Version

Instance Method Summary collapse

Instance Method Details

#compile(gherkin_documents, last_receiver, filters = [], event_bus = EventBus.new) ⇒ Object


18
19
20
21
22
23
# File 'lib/cucumber/core.rb', line 18

def compile(gherkin_documents, last_receiver, filters = [], event_bus = EventBus.new)
  first_receiver = compose(filters, last_receiver)
  compiler = Compiler.new(first_receiver)
  parse gherkin_documents, compiler, event_bus
  self
end

#execute(gherkin_documents, filters = [], event_bus = EventBus.new) {|event_bus| ... } ⇒ Object

Yields:

  • (event_bus)

11
12
13
14
15
16
# File 'lib/cucumber/core.rb', line 11

def execute(gherkin_documents, filters = [], event_bus = EventBus.new)
  yield event_bus if block_given?
  receiver = Test::Runner.new(event_bus)
  compile gherkin_documents, receiver, filters
  self
end