Sha256: 3ee803b139f99ff5b0c2bdd5812764a0444315a18b80399d37c8a6f8290bff4d

Contents?: true

Size: 860 Bytes

Versions: 8

Compression:

Stored size: 860 Bytes

Contents

require 'spec_helper'

describe Ratis::Area do
  describe '#all', vcr: {} do
    it 'only makes one request' do
      # false just to stop further processing of response
      Ratis::Request.should_receive(:get).once.and_call_original
      Ratis::Area.all
    end

    it 'requests the correct SOAP action with correct args' do
      Ratis::Request.should_receive(:get) do |action, options|
        action.should eq('Getareas')
      end.and_return(double('response', :success? => false))

      Ratis::Area.all
    end

    it 'should return all areas' do
      pending
      areas = Ratis::Area.all
      areas.should have(29).items
    end

    it "should parse the area fields" do
      pending
      areas = Ratis::Area.all
      area  = areas.last

      expect(area.area).to eq('YG')
      expect(area.description).to eq('Youngtown')
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ratis-3.6.6 spec/ratis/area_spec.rb
ratis-3.6.5 spec/ratis/area_spec.rb
ratis-3.6.4 spec/ratis/area_spec.rb
ratis-3.6.3 spec/ratis/area_spec.rb
ratis-3.6.2 spec/ratis/area_spec.rb
ratis-3.6.1 spec/ratis/area_spec.rb
ratis-3.6.0 spec/ratis/area_spec.rb
ratis-3.5.0 spec/ratis/area_spec.rb