Sha256: 8f8f2b541195cba3a60387a7cac4658cb1f3fe59284f65ddcf084030d5eebd4e

Contents?: true

Size: 466 Bytes

Versions: 7

Compression:

Stored size: 466 Bytes

Contents

require 'helper'

describe HackerNewsSearch::Client::Users do

  before do
    @client = HackerNewsSearch::Client.new
  end

  describe ".users" do
      before do
        stub_get("users/sferik").
          to_return(:status => 200, :body => fixture("users.json"))
      end

      it "should return one user" do
        user = @client.users("sferik")
        a_get("users/sferik").should have_been_made
        user.username.should == "sferik"
      end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hacker_news_search-0.0.7 spec/hacker_news_search/users_spec.rb
hacker_news_search-0.0.6 spec/hacker_news_search/users_spec.rb
hacker_news_search-0.0.5 spec/hacker_news_search/users_spec.rb
hacker_news_search-0.0.4 spec/hacker_news_search/users_spec.rb
hacker_news_search-0.0.3 spec/hacker_news_search/users_spec.rb
hacker_news_search-0.0.2 spec/hacker_news_search/users_spec.rb
hacker_news_search-0.0.1 spec/hacker_news_search/users_spec.rb