Sha256: 5caa91a80c2a7acbee36038424d2b1343cd8fc695bf84a6a3b644b96b60a3323

Contents?: true

Size: 794 Bytes

Versions: 2

Compression:

Stored size: 794 Bytes

Contents

require 'spec_helper'

describe Google::Scholar do
  describe ".google_root" do
    it "should return scholar.google.com" do
      Google::Scholar.google_root.should == "scholar.google.com"
    end
  end
  describe ".author_search_url" do
    context "when given an author name" do
      it "should give an appropriate url" do
        Google::Scholar.author_search_url("test").should == 'http://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=author%3A%22test%22'
      end
    end
    context "when given an author name with spaces" do
      it "should perform escaping" do
        Google::Scholar.author_search_url("testing this").should == 'http://scholar.google.com/citations?view_op=search_authors&hl=en&mauthors=author%3A%22testing+this%22'
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

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