Sha256: ec806d1140f35463de0ca4f43a26286cd12daa1287936152025c56104a9591a0

Contents?: true

Size: 916 Bytes

Versions: 6

Compression:

Stored size: 916 Bytes

Contents

require File.dirname(__FILE__) + '/spec_helper.rb'

describe FireEagle::Locations do
  before :each do
    @instance = FireEagle::Locations.parse(responses(:locations_chunk))
  end

  it "should be Enumerable" do
    @instance.should be_a_kind_of(Enumerable)
  end

  it "should have a length" do
    @instance.length.should == 9
  end

  it "should have a size" do
    @instance.size.should == 9
  end

  it "should be indexable" do
    @instance[0].should_not be_nil
  end

  it "should be indexable by Range" do
    @instance[0..2].length.should == 3
  end

  it "should be indexable by 'start' and 'length'" do
    @instance[0, 2].length.should == 2
  end

  it "should be sliceable" do
    @instance.should respond_to(:slice)
  end

  it "should have a first element" do
    @instance.first.should == @instance[0]
  end

  it "should have a last element" do
    @instance.last.should == @instance[-1]
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
jnewland-fireeagle-0.8.0.1 spec/locations_spec.rb
jnewland-fireeagle-0.8.99.1 spec/locations_spec.rb
mojodna-fireeagle-0.8.0.1 spec/locations_spec.rb
mojodna-fireeagle-0.8.99.1 spec/locations_spec.rb
mojodna-fireeagle-0.8.99 spec/locations_spec.rb
fireeagle-0.8.0.1 spec/locations_spec.rb