Sha256: 0f46e86679c94052c49b4551fb6d45def840e5aa8c1352be707e1fe3b7f75a89

Contents?: true

Size: 839 Bytes

Versions: 6

Compression:

Stored size: 839 Bytes

Contents

require "spec_helper"
require_relative "../../lib/dribbble_bucket_api/public_site"

describe DribbbleBucketApi::PublicSite do
	subject do
		DribbbleBucketApi::PublicSite.new
	end

	describe "#user_buckets" do
		context "when provided with a username" do
			it "should return the remote data" do
				result = subject.user_buckets(username: "ryantownsend")
				expect(result).to be_kind_of(DribbbleBucketApi::BucketIndexParser)
			end
		end
		
		context "when provided with an invalid username" do
			it "should raise an exception" do
				expect {
					subject.user_buckets(username: "h8ahsdIhdasd8q0398d")
				}.to raise_error
			end
		end
		
		context "when not provided with a username" do
			it "should raise an exception" do
				expect {
					subject.user_buckets(username: nil)
				}.to raise_error(ArgumentError)
			end
		end
	end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
dribbble-bucket-api-0.0.6 spec/dribbble_bucket_api/public_site_spec.rb
dribbble-bucket-api-0.0.5 spec/dribbble_bucket_api/public_site_spec.rb
dribbble-bucket-api-0.0.4 spec/dribbble_bucket_api/public_site_spec.rb
dribbble-bucket-api-0.0.3 spec/dribbble_bucket_api/public_site_spec.rb
dribbble-bucket-api-0.0.2 spec/dribbble_bucket_api/public_site_spec.rb
dribbble-bucket-api-0.0.1 spec/dribbble_bucket_api/public_site_spec.rb