Sha256: 8f09d40613b8ebaa00f8c295e29c21064206b598af595ceff6f668b63c7d3461

Contents?: true

Size: 870 Bytes

Versions: 1

Compression:

Stored size: 870 Bytes

Contents

require 'spec_helper'

describe Freebase do
  it "should have a version" do
    Freebase.const_get('VERSION').should_not be_nil
  end

  it "should have a default language" do
    Freebase.language.should_not be_nil
  end

  it "should have a default User-Agent string" do
    Freebase.user_agent.should_not be_nil
  end

  it "should return an item from a given URL" do
    @item = Freebase.item('http://www.freebase.com/view/en/squarepusher/')
    @item.should_not be_nil
    @item.name.should == 'Squarepusher'
  end

  it "should return an item from a given GUID" do
    @item = Freebase.item('9202a8c04000641f8000000000184c7a')
    @item.should_not be_nil
    @item.name.should == 'Conflict'
  end

  it "should return an item for a given title" do
    @item = Freebase.item('Aphex Twin')
    @item.should_not be_nil
    @item.name.should == 'Aphex Twin'
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
freescrape-0.0.9 spec/freebase_spec.rb