Skip to content

Instantly share code, notes, and snippets.

@tooky
Created Jun 26, 2015
Embed
What would you like to do?
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