Module: Specjour::Cucumber::Runner

Defined in:
lib/specjour/cucumber/runner.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) run(feature, output)



4
5
6
7
8
9
10
11
12
13
# File 'lib/specjour/cucumber/runner.rb', line 4

def self.run(feature, output)
  cli = ::Cucumber::Cli::Main.new(['--format', 'Specjour::Cucumber::DistributedFormatter', feature], output)

  Cucumber.runtime.instance_variable_set(:@configuration, cli.configuration)
  Cucumber.runtime.instance_eval do
    tree_walker = @configuration.build_tree_walker(self)
    self.visitor = tree_walker
    tree_walker.visit_features(features)
  end
end