Skip to content

Commit

Permalink
airport consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
klauern committed Apr 29, 2012
1 parent 6dde672 commit e7e5dcd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions 2-cheap-tourist-fast-tourist/spec/graph/creating_spec.rb
Expand Up @@ -32,4 +32,17 @@
flight[:cost].must_be(:==, 100)
flight[:flight_time].must_be(:==, 2)
end


it "should NOT create multiple airports given multiple input lines" do
graph = FlightGraph.new

["A C 17:00 18:07 161.80", "C D 14:00 14:42 656.71", "D Z 21:00 22:07 312.80",
"C D 01:00 01:42 90.71"].each { |flight|
graph.read_flight(flight)
}
%w{ A C D Z }.each { |a|
Airport.find("name: #{a}").size.must_be(:==, 1)
}
end
end

0 comments on commit e7e5dcd

Please sign in to comment.