Skip to content

Commit

Permalink
sqlite tests now run properly on fresh install
Browse files Browse the repository at this point in the history
  • Loading branch information
ssoper committed Mar 27, 2009
1 parent 0550720 commit bbdfc28
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions acts_as_encryptable.gemspec
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|
s.name = "acts_as_encryptable"
s.version = "1.0.2"
s.date = "2009-03-26"
s.version = "1.0.3"
s.date = "2009-03-27"
s.author = "Sean Soper"
s.email = "sean.soper@gmail.com"
s.summary = "Encrypt and decrypt your data using asymmetric keys"
Expand All @@ -15,10 +15,12 @@ Gem::Specification.new do |s|
generators/acts_as_encryptable_migration/acts_as_encryptable_migration_generator.rb
sample_keys/rsa_key.pub
sample_keys/rsa_key
test/test_helper.rb
test/unit/base_test.rb
test/unit/crypto_test.rb
MIT-LICENSE
Rakefile
README.rdoc
TODO
Changelog }
s.has_rdoc = true
s.extra_rdoc_files = %w{ MIT-LICENSE
Expand Down
3 changes: 2 additions & 1 deletion test/test_helper.rb
@@ -1,14 +1,15 @@
require 'rubygems'
require 'test/unit'
require 'activerecord'
require 'fileutils'

ENV['RAILS_ENV'] = 'test'
require File.dirname(__FILE__) + '/../lib/acts_as_encryptable'

class Test::Unit::TestCase

def establish_connection(db_file = nil)
db_file = File.join(File.dirname(__FILE__), '/tmp/tests.sqlite') unless db_file
db_file = File.join('/tmp/acts_as_encryptable_tests.sqlite') unless db_file
ActiveRecord::Base.configurations = { 'ActiveRecord::Base' => { :adapter => 'sqlite3', :database => db_file, :timeout => 5000 } }
ActiveRecord::Base.establish_connection('ActiveRecord::Base')
ActiveRecord::Base.connection.execute('drop table if exists credit_cards')
Expand Down
1 change: 0 additions & 1 deletion test/tmp/.gitignore

This file was deleted.

0 comments on commit bbdfc28

Please sign in to comment.