Sha256: 0c5f27d6c911c18f148cb6a69407d08bcce12a4634b3736cb080340f6c68a92c
Contents?: true
Size: 964 Bytes
Versions: 12
Compression:
Stored size: 964 Bytes
Contents
require 'echelon/park' require 'echelon/parks/thorpe_park' # Mosts of the test here are pretty generic, although you can test for specific # cases, such as the active states may differ between parks, and queue times may # not exceed a certain value etc etc. describe Echelon::ThorpePark do before do @park = Echelon::ThorpePark.new() end it "should inherit from Park" do @park.should be_kind_of(Echelon::ThorpePark) end it "should have some rides" do @park.ride_list.count.should satisfy { |v| v > 1 && v < 30 } end it "should return ride objects" do @park.find_by_name("Stealth").should be_kind_of(Echelon::Ride) @park.find_by_id(3).should be_kind_of(Echelon::Ride) end it "should return ride object values correctly" do ride = @park.find_by_id(3) ride.name.should eql("Stealth") ride.queue_time.should satisfy { |v| v >= 0 && v < 1000 } ride.active.should satisfy { |v| v == 0 || v == 1 } end end
Version data entries
12 entries across 12 versions & 1 rubygems