Sha256: 9035a097601ddbb0877ec8ecbeefbe220a5228d4493d2f956421abd150cf1f16

Contents?: true

Size: 633 Bytes

Versions: 2

Compression:

Stored size: 633 Bytes

Contents

require 'spec_helper'

describe Google::Scholar::AuthorSearch do
  subject {Google::Scholar::AuthorSearch}
  before(:each) do
    Google::Scholar::Scraper.should_receive(:open).and_return(author_result.to_html)
    @doc = subject.new(Google::Scholar.author_search_url("test"))
  end
  it "should initialize" do
    @doc
  end
  describe ".authors" do
    it "should return an author enumerator" do
      @doc.authors.should be_kind_of Google::Scholar::AuthorEnumerator
    end
  end
end
def author_result
  @author_result ||= Nokogiri::HTML::DocumentFragment.parse(File.open(File.join(FIXTURE_DIR,"author_result_page.htm")).read)
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
google-scholar-0.0.2 spec/lib/google/scholar/author_search_spec.rb
google-scholar-0.0.1 spec/lib/google/scholar/author_search_spec.rb