Sha256: f37958553430198dcd242bfa9a5f9e272bccbdff05e7869fadeac902ca41cb9d

Contents?: true

Size: 734 Bytes

Versions: 10

Compression:

Stored size: 734 Bytes

Contents

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

describe YouGotListed::Complex do
  
  before do
    @ygl = new_ygl
    @complex = YouGotListed::Complex.new(valid_complex_rash, @ygl)
  end
  
  it "should return photos for pictures" do
    @complex.pictures.should == @complex.photos.photo
  end
  
  it "should create methods from all hash keys" do
    @complex.should respond_to("id", "name", "addresses", "public_notes", "photos", "listings")
  end
  
  it "should return an array of properties" do
    @complex.properties.should be_kind_of(Array)
    @complex.properties.each do |property|
      property.should be_kind_of(YouGotListed::Listing)
    end
    @complex.properties.size.should == 2
  end
  
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
you_got_listed-0.3.3 spec/you_got_listed/complex_spec.rb
you_got_listed-0.3.2 spec/you_got_listed/complex_spec.rb
you_got_listed-0.3.1 spec/you_got_listed/complex_spec.rb
you_got_listed-0.3.0 spec/you_got_listed/complex_spec.rb
you_got_listed-0.2.5 spec/you_got_listed/complex_spec.rb
you_got_listed-0.2.4 spec/you_got_listed/complex_spec.rb
you_got_listed-0.2.3 spec/you_got_listed/complex_spec.rb
you_got_listed-0.2.2 spec/you_got_listed/complex_spec.rb
you_got_listed-0.2.1 spec/you_got_listed/complex_spec.rb
you_got_listed-0.2.0 spec/you_got_listed/complex_spec.rb