Sha256: cf83169e3193486c48d444b47d1eb21eaf70664e8dd9e725564760c7c3bddbf8

Contents?: true

Size: 454 Bytes

Versions: 12

Compression:

Stored size: 454 Bytes

Contents

require 'spec_helper'

describe Adminpanel::Gallery do
	before do
		@gallery = Adminpanel::Gallery.new(
			:file => "Test file"
			)
	end

	subject { @gallery }

	it { should respond_to(:file) }

	describe "when file is not present" do
		before {@gallery.file = " "}
		it {should_not be_valid}
	end

	describe "default scope" do
		it { expect(Adminpanel::Gallery.scoped.to_sql).to eq Adminpanel::Gallery.reorder('').order('position ASC').to_sql}
	end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
adminpanel-1.2.9 spec/models/gallery_spec.rb
adminpanel-1.2.8 spec/models/gallery_spec.rb
adminpanel-1.2.7 spec/models/gallery_spec.rb
adminpanel-1.2.6 spec/models/gallery_spec.rb
adminpanel-1.2.5 spec/models/gallery_spec.rb
adminpanel-1.2.4 spec/models/gallery_spec.rb
adminpanel-1.2.3 spec/models/gallery_spec.rb
adminpanel-1.2.2 spec/models/gallery_spec.rb
adminpanel-1.2.1 spec/models/gallery_spec.rb
adminpanel-1.2.0 spec/models/gallery_spec.rb
adminpanel-1.1.0 spec/models/gallery_spec.rb
adminpanel-1.0.0 spec/models/gallery_spec.rb