Sha256: 8b10d1d977bc934d15d96b04ad6fc0bd8812943715f48e35e4fff6418607af06

Contents?: true

Size: 603 Bytes

Versions: 7

Compression:

Stored size: 603 Bytes

Contents

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

describe Wikipedia, ".find" do
  it "should return a Wikipedia::Page instance" do
    page = Wikipedia.find('Getting_Things_Done')
    page.should be_an_instance_of(Wikipedia::Page)
  end
  
  it "should return a Page with a title" do
    page = Wikipedia.find('Getting_Things_Done')
    page.title.should_not be_nil
  end
  
  it "should return a Page given a URL" do
    page1 = Wikipedia.find('Getting_Things_Done')
    
    page2 = Wikipedia.find('http://en.wikipedia.org/wiki/Getting_Things_Done')
    page1.title.should == page2.title
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
wikipedia-client-1.6.3 spec/lib/wikipedia_spec.rb
wikipedia-client-1.6.2 spec/lib/wikipedia_spec.rb
wikipedia-client-1.6.1 spec/lib/wikipedia_spec.rb
wikipedia-client-1.5.0 spec/lib/wikipedia_spec.rb
wikipedia-client-1.4.0 spec/lib/wikipedia_spec.rb
wikipedia-client-1.3.3 spec/lib/wikipedia_spec.rb
wikipedia-client-1.3.2 spec/lib/wikipedia_spec.rb