test_seeds 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
data/lib/test_seeds.rb CHANGED
@@ -34,7 +34,10 @@ module TestSeeds
34
34
  post_vars = self.instance_variables
35
35
 
36
36
  (post_vars - pre_vars).each do |seed_var|
37
- seed_accessor = self.set_seed_fixture(seed_var.to_s[1..-1], self.instance_variable_get(seed_var))
37
+ seed_name = seed_var.to_s[1..-1]
38
+ next if seed_name.starts_with?("_")
39
+
40
+ seed_accessor = self.set_seed_fixture(seed_name, self.instance_variable_get(seed_var))
38
41
  self.instance_variable_set(seed_var, nil) # avoid memory bloat
39
42
 
40
43
  defined_seeds = self.class.defined_seeds
@@ -11,6 +11,8 @@ class TestTestSeeds < ActiveSupport::TestCase
11
11
  end
12
12
 
13
13
  seeds(:foo) do
14
+ assert "skip variables like @_assertion_wrapped"
15
+
14
16
  @foo_1 = Author.create!(:name => 'foo first')
15
17
  @foo_2 = Author.create!(:name => 'foo second')
16
18
  end
data/test_seeds.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{test_seeds}
8
- s.version = "0.0.2"
8
+ s.version = "0.0.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Paul Kmiec}]
12
- s.date = %q{2011-08-16}
12
+ s.date = %q{2011-08-18}
13
13
  s.description = %q{Test Seeds piggy backs on the transaction fixtures functionality. Test Seeds load fixtures into the database in the same way but then start a db transaction for the duration of the test file. Any objects for the common scenarios are then created and inserted into the database. Test Seeds then execute each test case within a context of a db savepoint (or nested db transactions). This allows test seeds to be inserted into the database once and then re-used for each test case that needs it.}
14
14
  s.email = %q{pkmiec@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_seeds
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Paul Kmiec
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-08-16 00:00:00 Z
18
+ date: 2011-08-18 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  requirement: &id001 !ruby/object:Gem::Requirement