Sha256: ff15b905ca17c1b1121e31c542a1a13d3251fa6b43cb6850f0d71e0ff0ecc850

Contents?: true

Size: 520 Bytes

Versions: 2

Compression:

Stored size: 520 Bytes

Contents

require 'spec_helper'

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

  subject { @image }

  it { should respond_to(:file) }
  it { should respond_to(:foreign_key) }
  it { should respond_to(:model) }

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adminpanel-0.0.6.1 spec/models/image_uploader.rb
adminpanel-0.0.6 spec/models/image_uploader.rb