Sha256: 7a166b94d7209640003e7076df9d3d5b0383bca7fc254946d8607e0ea1adf55b

Contents?: true

Size: 724 Bytes

Versions: 16

Compression:

Stored size: 724 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

16 entries across 16 versions & 1 rubygems

Version Path
you_got_listed-0.7.2 spec/you_got_listed/complex_spec.rb
you_got_listed-0.7.1 spec/you_got_listed/complex_spec.rb
you_got_listed-0.7.0 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.6 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.5 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.4 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.3 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.2 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.1 spec/you_got_listed/complex_spec.rb
you_got_listed-0.6.0 spec/you_got_listed/complex_spec.rb
you_got_listed-0.5.1 spec/you_got_listed/complex_spec.rb
you_got_listed-0.5.0 spec/you_got_listed/complex_spec.rb
you_got_listed-0.4.0 spec/you_got_listed/complex_spec.rb
you_got_listed-0.3.6 spec/you_got_listed/complex_spec.rb
you_got_listed-0.3.5 spec/you_got_listed/complex_spec.rb
you_got_listed-0.3.4 spec/you_got_listed/complex_spec.rb