55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
# File 'lib/turnip/rspec.rb', line 55
def run(feature_file)
Turnip::Builder.build(feature_file).features.each do |feature|
describe feature.name, feature.metadata_hash do
before do
example.metadata[:file_path] = feature_file
feature.backgrounds.map(&:steps).flatten.each do |step|
run_step(feature_file, step)
end
end
feature.scenarios.each do |scenario|
describe scenario.name, scenario.metadata_hash do
it scenario.steps.map(&:description).join(' -> ') do
scenario.steps.each do |step|
run_step(feature_file, step)
end
end
end
end
end
end
end
|