Sha256: 97e0cefa10133f35a1a6279fed6598c921475d8103c2d2bc370193e9308a7d63

Contents?: true

Size: 602 Bytes

Versions: 6

Compression:

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

6 entries across 6 versions & 1 rubygems

Version Path
wikipedia-client-1.3.0 spec/lib/wikipedia_spec.rb
wikipedia-client-1.2.0 spec/lib/wikipedia_spec.rb
wikipedia-client-1.1.2 spec/lib/wikipedia_spec.rb
wikipedia-client-1.1.1 spec/lib/wikipedia_spec.rb
wikipedia-client-1.1.0 spec/lib/wikipedia_spec.rb
wikipedia-client-1.0.0 spec/lib/wikipedia_spec.rb