Skip to content

Instantly share code, notes, and snippets.

@tooky
Created June 26, 2015 16:48
Show Gist options
  • Save tooky/7fee841bd7efddce3604 to your computer and use it in GitHub Desktop.
Save tooky/7fee841bd7efddce3604 to your computer and use it in GitHub Desktop.
puts "*" * 100
require 'cucumber/wire_support/wire_language'
class WireFilter < Cucumber::Core::Filter.new(:wire)
def test_case(test_case)
wire.begin_scenario(test_case)
test_case.describe_to receiver
wire.end_scenario
end
end
Cucumber.configure do |config|
wire_files = config.require_dirs.map { |path|
Dir[path + '/**/*.wire']
}.flatten
wire = Cucumber::WireSupport::WireLanguage.new(nil, Cucumber.configuration)
wire_files.each { |wire_file| wire.load_code_file(wire_file) }
p wire_files
config.filters << Cucumber::Filters::ActivateSteps.new(wire)
config.filters << WireFilter.new(wire)
end
# register snippet generator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment