Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

some cleanups

git-svn-id: http://llama/svn/trunk/ruby/acts_as_soft_deletable@231 bb26965d-a405-0410-8ce8-d62df5cd24e9
  • Loading branch information...
commit 787a3e5ad2d2a1d421e26a6ef9ec96481c24eb7b 1 parent d95a3fa
(no author) authored
6 test/RUNNING_UNIT_TESTS
@@ -9,5 +9,7 @@ Mocha must be installed.
9 9
10 10 == Running with Rake
11 11
12   -rake test # runs mysql tests by default
13   -rake test DB=sqlite3 # runs sqlite3 tests, see test/config.yml for other database options
  12 +rake test # runs tests against all databases
  13 +rake test:mysql # just runs mysql tests
  14 +
  15 +rake -T # See this for more info
2  test/connections/sqlite/connection.rb
@@ -2,4 +2,4 @@
2 2
3 3 ActiveRecord::Base.establish_connection \
4 4 :adapter => "sqlite",
5   - :dbfile => "acts_as_soft_deletable_plugin.sqlite.db"
  5 + :dbfile => "tmp/acts_as_soft_deletable_plugin.sqlite.db"
2  test/connections/sqlite3/connection.rb
@@ -2,4 +2,4 @@
2 2
3 3 ActiveRecord::Base.establish_connection \
4 4 :adapter => "sqlite3",
5   - :dbfile => "acts_as_soft_deletable_plugin.sqlite3.db"
  5 + :dbfile => "tmp/acts_as_soft_deletable_plugin.sqlite3.db"
23 test/test_helper.rb
... ... @@ -1,34 +1,21 @@
1   -$:.unshift(File.dirname(__FILE__) + '/../lib')
2 1 require 'rubygems'
3 2
4 3 require 'test/unit'
5 4 require 'mocha'
6 5
7   -#require '/home/ajh/devel/substantial/gorillakiller/config/environment.rb'
8 6 require 'active_support'
9 7 require 'active_record'
10 8 require 'active_record/fixtures'
11 9
12   -
13   -#require 'test/unit'
14   -## pull in a rails projects environment.rb
15   -#require '/home/ajh/devel/substantial/gorillakiller/config/environment.rb'
16   -#require 'rubygems'
17   -#require 'active_record/fixtures'
18   -#require 'mocha'
19   -
20 10 require 'acts_as_soft_deletable'
21 11
22 12 # pulls from one of test/connections/#{adapter}/connection.rb depending on how rake setup our lib paths
23 13 require 'connection'
24   -ActiveRecord::Base.logger = Logger.new File.dirname(__FILE__) + "/debug.log"
25 14
26   -require File.join(File.dirname(__FILE__),"fixtures", "models.rb")
27   -load File.join(File.dirname(__FILE__),"fixtures", "schema.rb")
  15 +ActiveRecord::Base.logger = Logger.new File.join(File.dirname(__FILE__),"..","tmp","test.log")
28 16
29   -# what does these do?
30   -#Test::Unit::TestCase.fixture_path = File.dirname(__FILE__) + "/fixtures/"
31   -#$LOAD_PATH.unshift(Test::Unit::TestCase.fixture_path)
  17 +require File.join(File.dirname(__FILE__),"fixtures", "models.rb")
  18 +require File.join(File.dirname(__FILE__),"fixtures", "schema.rb")
32 19
33 20 class SoftDeleteTestCase < Test::Unit::TestCase #:nodoc:
34 21 self.use_transactional_fixtures = false
@@ -44,8 +31,8 @@ def setup
44 31 super
45 32 end
46 33
47   - # found this in activesupport-2.0.2/lib/active_support/testing/default.rb
48   - # Prevents this abstract testcase from running
  34 + # Found this in activesupport-2.0.2/lib/active_support/testing/default.rb.
  35 + # It prevents this abstract testcase from running.
49 36 def run(*args)
50 37 #method_name appears to be a symbol on 1.8.4 and a string on 1.8.6
51 38 return if @method_name.to_s == "default_test"

0 comments on commit 787a3e5

Please sign in to comment.
Something went wrong with that request. Please try again.