transactional-factories 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/LICENSE-MIT ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2010, Tim Harrison, WestEd, Inc.
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile CHANGED
@@ -9,7 +9,7 @@ begin
9
9
  gem.description = gem.summary
10
10
  gem.email = "tim.harrison@yahoo.com"
11
11
  gem.homepage = "http://github.com/heedspin/transactional-factories"
12
- gem.authors = ["Tim Harrison"]
12
+ gem.authors = ["Andrew Carpenter", "Tim Harrison"]
13
13
  gem.add_dependency('activesupport', '>= 2.3.2')
14
14
  gem.add_dependency('activerecord', '>= 2.3.2')
15
15
  gem.files.exclude '.gitignore'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.2.0
@@ -1,6 +1,6 @@
1
- class Test::Unit::TestCase
2
- class << self
3
- def suite
1
+ module TransactionalFactories
2
+ module ClassMethods
3
+ def suite_with_transactions
4
4
  method_names = public_instance_methods(true)
5
5
  tests = method_names.delete_if {|method_name| method_name !~ /^test./}
6
6
  suite = TransactionalFactories::TestSuite.new(name)
@@ -18,4 +18,13 @@ class Test::Unit::TestCase
18
18
  return suite
19
19
  end
20
20
  end
21
+
22
+ def self.included(klass)
23
+ class << klass
24
+ include ClassMethods
25
+ alias_method_chain 'suite', 'transactions'
26
+ end
27
+ end
21
28
  end
29
+
30
+ Test::Unit::TestCase.send(:include, TransactionalFactories)
@@ -10,6 +10,4 @@ ActiveRecord::Base.connection.recreate_database('transactional_factories_test')
10
10
  ActiveRecord::Base.clear_active_connections!
11
11
  ActiveRecord::Base.establish_connection( { :adapter => 'mysql', :database => 'transactional_factories_test' } )
12
12
 
13
- load File.dirname(__FILE__) + '/db/schema.rb'
14
- $:.push File.dirname(__FILE__) + '/lib'
15
- $:.push File.dirname(__FILE__) + '/../lib'
13
+ load 'db/schema.rb'
@@ -1,6 +1,6 @@
1
- require File.dirname(__FILE__) + '/../test_helper'
1
+ require 'lib/test_helper'
2
2
 
3
- require 'blog_post'
3
+ require 'lib/blog_post'
4
4
  require 'transactional_factories'
5
5
 
6
6
  class TestBlogPost < Test::Unit::TestCase
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transactional-factories
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Andrew Carpenter
7
8
  - Tim Harrison
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
12
 
12
- date: 2010-01-04 00:00:00 -08:00
13
+ date: 2010-01-05 00:00:00 -08:00
13
14
  default_executable:
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
@@ -39,6 +40,7 @@ executables: []
39
40
  extensions: []
40
41
 
41
42
  extra_rdoc_files:
43
+ - LICENSE-MIT
42
44
  - README.rdoc
43
45
  files:
44
46
  - README.rdoc
@@ -49,8 +51,9 @@ files:
49
51
  - lib/transactional_factories/test_suite.rb
50
52
  - test/db/schema.rb
51
53
  - test/lib/blog_post.rb
52
- - test/test_helper.rb
54
+ - test/lib/test_helper.rb
53
55
  - test/unit/blog_post_test.rb
56
+ - LICENSE-MIT
54
57
  has_rdoc: true
55
58
  homepage: http://github.com/heedspin/transactional-factories
56
59
  licenses: []
@@ -82,5 +85,5 @@ summary: Using nested-transactions to allow efficient, programmatic initializati
82
85
  test_files:
83
86
  - test/db/schema.rb
84
87
  - test/lib/blog_post.rb
85
- - test/test_helper.rb
88
+ - test/lib/test_helper.rb
86
89
  - test/unit/blog_post_test.rb