Sha256: 59a5fdc32d1f7d60c08f90329cb7971ca793fa7c767225602c8c6746ae188e24
Contents?: true
Size: 1.14 KB
Versions: 1
Compression:
Stored size: 1.14 KB
Contents
require 'echelon/ride' require 'echelon/park' describe Echelon::Ride do before do @ride = Echelon::Ride.new(:name => 'Ride', :queue_time => 10, :active => 1) end it "should return the name of the ride" do @ride.name.should eql('Ride') end it "should return the queue time" do @ride.queue_time.should eql(10) end it "should return the ride status" do @ride.active.should eql(1) end end describe Echelon::Park do before do @park = Echelon::Park.new end it "should provide a set of methods" do @park.should respond_to(:ride_list) @park.should respond_to(:rides) @park.should respond_to(:find_by_name) @park.should respond_to(:find_by_id) end it "should contain a blank ride list" do @park.ride_list.should eql({}) @park.rides.should eql([]) end describe 'find_by_name' do it "should raise if ride isn't available" do lambda { @park.find_by_name('Unknown Ride') }.should raise_error(ArgumentError) end end describe 'find_by_id' do it "should raise if ride isn't available" do lambda { @park.find_by_id(1) }.should raise_error(ArgumentError) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
echelon-0.0.3 | spec/echelon_spec.rb |