Sha256: 86d341a44e71b23fddf785d5d3451289f304867c22f865d30af7065807b84c93

Contents?: true

Size: 475 Bytes

Versions: 1

Compression:

Stored size: 475 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

1 entries across 1 versions & 1 rubygems

Version Path
adminpanel-0.1.1 spec/models/gallery_spec.rb