Sha256: db43f87e2a91c3339c89a55ef2b459a58b41ae82addec1bbdc2d805a970dbf91

Contents?: true

Size: 722 Bytes

Versions: 2

Compression:

Stored size: 722 Bytes

Contents

require 'spec_helper'

describe Item do
  before(:all) do
    @item = Item.from_url('http://www.freebase.com/view/en/aphex_twin')
  end

  it "should have a URL" do
    @item.url.should_not be_nil
  end

  it "should have a name" do
    @item.name.should_not be_nil
    @item.name.should_not be_empty
  end

  it "should have categories" do
    @item.categories.should_not be_empty
  end

  it "should have category names" do
    @item.category_names.should_not be_empty
  end

  it "should have metadata for each category" do
    @item.categories.each_value do |category|
      category.metadata.should_not be_empty

      category.metadata.each_value do |data|
        data.should_not be_nil
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
freescrape-0.0.9 spec/item_spec.rb
free-scrape-0.1.0 spec/item_spec.rb