Sha256: 46a677a6786e0031ae2e261c5539a95ad2b3782d372fe4261faf8c9bd22eb85c

Contents?: true

Size: 488 Bytes

Versions: 3

Compression:

Stored size: 488 Bytes

Contents

require 'spec_helper'
require 'support/test_database'


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

3 entries across 3 versions & 1 rubygems

Version Path
adminpanel-1.2.12 spec/models/gallery_spec.rb
adminpanel-1.2.11 spec/models/gallery_spec.rb
adminpanel-1.2.10 spec/models/gallery_spec.rb