Sha256: be26db102291a6dafae007bad2106d9a73be082d190a56b2dca06e2485ede79a

Contents?: true

Size: 1.2 KB

Versions: 2

Compression:

Stored size: 1.2 KB

Contents

require File.expand_path(File.join(File.dirname(__FILE__), '../spec_helper'))

describe FilmBuff::Title do
  before(:all) do
    @imdb = FilmBuff::IMDb.new
    @title = @imdb.find_by_id("tt0032138")
  end

  it "has an IMDb ID" do
    @title.imdb_id.should == "tt0032138"
  end

  it "has a title" do
    @title.title.should == "The Wizard of Oz"
  end

  it "has a tagline" do
    @title.tagline.should == "\"The Wizard\" Musical Returns By " <<
    "Unprecedented Demand! [UK re-release]"
  end

  it "has a plot" do
    @title.plot.should == "Dorothy Gale is swept away to a magical land in " <<
    "a tornado and embarks on a quest to see the Wizard who can help her " <<
    "return home."
  end

  it "has a runtime" do
    @title.runtime.should == "101 min"
  end

  it "has a rating" do
    @title.rating.should be_a(Float)
  end

  it "has an amount of votes" do
    @title.votes.should be_a(Integer)
  end

  it "has a poster URL" do
    @title.poster_url.should match /http:\/\/ia.media-imdb.com\/images\/.*/
  end

  it "has genres" do
    @title.genres.should == %w[ Adventure Comedy Family Fantasy Musical]
  end

  it "has a release date" do
    @title.release_date.should == DateTime.parse("1939-08-25")
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
filmbuff-0.1.1 spec/filmbuff/title_spec.rb
filmbuff-0.1.0 spec/filmbuff/title_spec.rb