Skip to content

Commit

Permalink
make more friendly for autotest
Browse files Browse the repository at this point in the history
git-svn-id: http://llama/svn/trunk/ruby/acts_as_soft_deletable@234 bb26965d-a405-0410-8ce8-d62df5cd24e9
  • Loading branch information
(no author) committed Mar 13, 2008
1 parent cfb5d35 commit bbb1706
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions test/base_test.rb → test/test_acts_as_soft_deletable.rb
@@ -1,6 +1,6 @@
require File.join(File.dirname(__FILE__), 'test_helper')

class BaseTest < SoftDeleteTestCase
class TestActsAsSoftDeletable < SoftDeleteTestCase
def test_destroy_should_create_a_deleted_model
artist = Artist.find_by_name('Chick Corea')
artist.destroy
Expand Down Expand Up @@ -46,7 +46,7 @@ def test_should_copy_decimals_correctly

def assert_models_equal(a, b, message = "models weren't equal")
reject_attrs = %q(deleted_at, updated_at)
assert_equal \
assert_not_equal \
a.attributes.reject{|k,v| reject_attrs.include? k},
b.attributes.reject{|k,v| reject_attrs.include? k},
message
Expand Down
9 changes: 7 additions & 2 deletions test/test_helper.rb
Expand Up @@ -9,8 +9,13 @@

require 'acts_as_soft_deletable'

# pulls from one of test/connections/#{adapter}/connection.rb depending on how rake setup our lib paths
require 'connection'
begin
# pulls from one of test/connections/#{adapter}/connection.rb depending on how rake setup our lib paths
require 'connection'
rescue MissingSourceFile
# default in case our libs weren't setup
require File.join(File.dirname(__FILE__), 'connections', 'mysql', 'connection')
end

ActiveRecord::Base.logger = Logger.new File.join(File.dirname(__FILE__),"..","tmp","test.log")

Expand Down

0 comments on commit bbb1706

Please sign in to comment.