Sha256: 531ebc08a30823126145cd1af01d873bae8d351dd4591f23e7e4ba6c834110d7

Contents?: true

Size: 724 Bytes

Versions: 3

Compression:

Stored size: 724 Bytes

Contents

require 'spec_helper'

describe "A basic gallery request" do

	before do
		@gallery = $imgur.gallery
	end
	
	it "should be an array" do
		@gallery.should.satisfy { |o| o.is_a?(Array) }
	end
	
	it "should have 20 images" do
		@gallery.size.should.equal 20
	end
	
end

describe "A more complicated gallery request" do
	
	before do
		@gallery = $imgur.gallery :sort => :latest, :count => 30
	end
	
	it "should be an array" do
		@gallery.should.satisfy { |o| o.is_a?(Array) }
	end
	
	it "should have 30 images" do
		@gallery.size.should.equal 30
	end
	
end

describe "An invalid gallery request" do

	it "should raise an ImgurError exception" do
		should.raise(Imgur::ImgurError) { $imgur.gallery :sort => :invalid }
	end
	
end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
vanntastic-imgur-0.3.0 spec/gallery_spec.rb
vanntastic-imgur-0.2.0 spec/gallery_spec.rb
imgur-0.2.0 spec/gallery_spec.rb