openstreetmap-website/script/yaml_to_spec
2008-01-23 16:43:30 +00:00

21 lines
415 B
Ruby
Executable file

#!/usr/bin/env ruby
require "yaml"
buffer = []
STDIN.each_line { |l| buffer << l }
contexts = YAML::load(buffer.join("\n"))
contexts.each do |context,specifications|
puts ""
puts "context \"#{context}\" do"
puts ""
specifications.each do |specification|
puts " specify \"#{specification}\" do"
puts " violated \"no assertions performed\""
puts " end"
puts ""
end
puts "end"
end