temping 3.6.0 → 3.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/temping.rb +8 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c776b555a0619329b67d0b0f2f9ab69b3da9c2a
4
- data.tar.gz: 4131bbfd5438cba4e5be09aead3b6b0a5433d807
3
+ metadata.gz: 9bbc8678c909e3f57c0412b5904356068e4df2bc
4
+ data.tar.gz: 87a1e017b98cf4a196fc3b32f966f71d33e09373
5
5
  SHA512:
6
- metadata.gz: 794a60b86450c0a221654efb828aff3277be52d0db8038f8c37cd6aa4da1cf51dac57e890858d732743d9e1223e4ec804c8259037424cbde741e338d318b93b5
7
- data.tar.gz: 86c94528287fec51235f6557dc59c209cd8a5ea0393f7cdaa21e116764dc164078fb5de089552c967f3a425d476057e505d14b7ff6e5b94276bda4e292e48c10
6
+ metadata.gz: a1d36bb52ec584888dfb530ae59355ae95e8bbfc1d7bd4d411596e1194f59d7e9edc8308f093f1b0eafd224b50d1da290aa150c8aa7f516612162f873af166d7
7
+ data.tar.gz: 6e54c9c3272e3447ad7e7a0d36c7556004d728c77fd935df9b5818e18f5041c23bb6d2aa9d27ed804546a2af07d1ba438735350bcceb0589d7e09e87329d3440
@@ -13,13 +13,16 @@ class Temping
13
13
  end
14
14
 
15
15
  def teardown
16
- @model_klasses.each do |klass|
17
- if Object.const_defined?(klass.name)
18
- klass.connection.drop_table(klass.table_name)
19
- Object.send(:remove_const, klass.name)
16
+ if @model_klasses.any?
17
+ @model_klasses.each do |klass|
18
+ if Object.const_defined?(klass.name)
19
+ klass.connection.drop_table(klass.table_name)
20
+ Object.send(:remove_const, klass.name)
21
+ end
20
22
  end
23
+ @model_klasses.clear
24
+ ActiveSupport::Dependencies.clear
21
25
  end
22
- @model_klasses.clear
23
26
  end
24
27
 
25
28
  def cleanup
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: temping
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Pignata
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-23 00:00:00.000000000 Z
11
+ date: 2016-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord