require 'spec_helper' describe Ratis::LandmarkCategory do before do stub_atis_request.to_return( atis_response 'Getcategories', '1.1', '0', <<-BODY ) AIRPORT AIRPT CASINO CAS CEMETARIES CEM BODY @landmark_categories = Ratis::LandmarkCategory.all end it 'only makes one request' do an_atis_request.should have_been_made.times 1 end it 'requests the correct SOAP action' do an_atis_request_for('Getcategories').should have_been_made end it 'should return all landmark categories' do @landmark_categories.should have(3).items @landmark_categories[0].type.should eql 'AIRPORT' @landmark_categories[0].description.should eql 'AIRPT' @landmark_categories[1].type.should eql 'CASINO' @landmark_categories[1].description.should eql 'CAS' @landmark_categories[2].type.should eql 'CEMETARIES' @landmark_categories[2].description.should eql 'CEM' end end