Sha256: 6ac49a588a870765008f0a80d35bc161e4eeaa9197d02b4d36ff7be1cf79c6b0

Contents?: true

Size: 640 Bytes

Versions: 4

Compression:

Stored size: 640 Bytes

Contents

require 'spec_helper'

describe 'spec_helper' do
  it 'successfully connects to an in-memory database' do
    User.connection_config[:adapter].should eq('sqlite3')
    User.connection_config[:database].should eq(':memory:')
    User.create!
    User.count.should eq(1)
  end

  it 'rolls back between examples' do
    User.count.should eq(0)
  end

  it 'defines Rails.root' do
    Rails.root.should eq(File.expand_path('../..', __FILE__))
  end
end

describe User do
  it 'is an active record' do
    User.new.should be_an(ActiveRecord::Base)
  end

  it 'has an avatar' do
    User.new.avatar.should be_a(Paperclip::Attachment)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
paperclip-storage-tmp-0.0.4 spec/meta_spec.rb
paperclip-storage-tmp-0.0.3 spec/meta_spec.rb
paperclip-storage-tmp-0.0.2 spec/meta_spec.rb
paperclip-storage-tmp-0.0.1 spec/meta_spec.rb