Sha256: 2e9e2b9d69ce22fd0b6c0da52f43e6901c1e8988d77bfc3c0d2c83d6257d971b

Contents?: true

Size: 732 Bytes

Versions: 5

Compression:

Stored size: 732 Bytes

Contents

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

describe DribbbleBucketApi::Shot do
	let(:id) { 156734 }

	subject do
		DribbbleBucketApi::Shot.new({ id: id })
	end
	
	describe "::new" do
		context "without an id" do
			let(:id) { nil }
			
			it "should raise an exception" do
				expect { subject }.to raise_error(ArgumentError)
			end
		end
	end

	describe "#image_url" do
		context "when the image_url has not yet been loaded" do
			it "should return a string" do
				expect(subject.image_url).to match /^https?\:\/\//
			end
		end
	end
	
	describe "#a_random_method" do
		it "should return method missing" do
			expect {
				subject.a_random_method
			}.to raise_error(NoMethodError)
		end
	end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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