]> git.openstreetmap.org Git - rails.git/blob - script/yaml_to_spec
fixing the tests due to a osm -> diffChange and moving to floats
[rails.git] / script / yaml_to_spec
1 #!/usr/bin/env ruby
2 require "yaml"
3
4 buffer = []
5 STDIN.each_line { |l| buffer << l }
6
7 contexts = YAML::load(buffer.join("\n"))
8
9 contexts.each do |context,specifications|
10   puts ""
11   puts "context \"#{context}\" do"
12   puts ""
13   specifications.each do |specification|
14     puts "  specify \"#{specification}\" do"
15     puts "    violated \"no assertions performed\""
16     puts "  end"
17     puts ""
18   end
19   puts "end"
20 end
21