Sha256: 04520ae927e7b8ca83b02e333e3f2f264f9529559a7e5809c114d8794ef3466e

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require 'echelon/park'
require 'echelon/parks/disneyland_paris'

# 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::DisneylandParis do

  before do
    @park = Echelon::DisneylandParis.new()
  end

  it "should inherit from Park" do
    @park.should be_kind_of(Echelon::DisneylandParis)
  end

  it "should have some rides" do
    @park.ride_list.count.should satisfy { |v| v > 1 && v < 40 }
  end

  it "should return ride objects" do
    @park.find_by_name("Pirates of the Caribbean").should be_kind_of(Echelon::Ride)
    @park.find_by_id('P1AA04').should be_kind_of(Echelon::Ride)
  end

  it "should return ride object values correctly" do
    stealth = @park.find_by_id("P1AA04")
    stealth.name.should eql("Pirates of the Caribbean")
    stealth.queue_time.should satisfy { |v| v >= 0 && v < 500 }
    stealth.active.should satisfy { |v| v >= -1 && v < 3 }
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
echelon-0.0.3 spec/disneyland_paris_spec.rb