with_model 0.3 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.3.1
2
+
3
+ Don't cache connection between tests. (Ryan Ong & Richard Nuno)
4
+
1
5
  ### 0.3
2
6
 
3
7
  Use RSpec 2.11's built-in constant stubbing.
@@ -1,3 +1,3 @@
1
1
  module WithModel
2
- VERSION = "0.3"
2
+ VERSION = "0.3.1"
3
3
  end
data/lib/with_model.rb CHANGED
@@ -8,15 +8,14 @@ module WithModel
8
8
  end
9
9
 
10
10
  def with_table(name, options = {}, &block)
11
- connection = ActiveRecord::Base.connection
12
-
13
11
  before do
12
+ connection = ActiveRecord::Base.connection
14
13
  connection.drop_table(name) if connection.table_exists?(name)
15
14
  connection.create_table(name, options, &block)
16
15
  end
17
16
 
18
17
  after do
19
- connection.drop_table(name)
18
+ ActiveRecord::Base.connection.drop_table(name)
20
19
  end
21
20
  end
22
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: with_model
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.3'
4
+ version: 0.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-08-07 00:00:00.000000000 Z
13
+ date: 2012-10-08 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activerecord
@@ -88,12 +88,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
88
88
  - - ! '>='
89
89
  - !ruby/object:Gem::Version
90
90
  version: '0'
91
+ segments:
92
+ - 0
93
+ hash: -4572723804950659860
91
94
  required_rubygems_version: !ruby/object:Gem::Requirement
92
95
  none: false
93
96
  requirements:
94
97
  - - ! '>='
95
98
  - !ruby/object:Gem::Version
96
99
  version: '0'
100
+ segments:
101
+ - 0
102
+ hash: -4572723804950659860
97
103
  requirements: []
98
104
  rubyforge_project:
99
105
  rubygems_version: 1.8.24