test_after_commit 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f28c952246590524b412f26963201c88aaabe6c2
4
- data.tar.gz: 26e9e449689852865fa2a1f1341c6e36a1a62acc
3
+ metadata.gz: ecb5ad1846055c48780400cecd1a21e2399d6862
4
+ data.tar.gz: d0abaa5cf7047545e2d4aaafcee3f2d2f6d434d1
5
5
  SHA512:
6
- metadata.gz: 42e5bb07dcbe4a5466a68f7c06bb2e6647e489f1cb861476008f3a4d36eefb3e7dad24f64065f801bd795116c98990452b3d503f857c2d88f441569d6f47cd40
7
- data.tar.gz: 953efcd1cb8ee464baff43be3eed4908ac16eb422a76cfb9b0cbbb6c131014a4ee06d7869f875b1f7f5bc76ce8f3ad8395dd4e96a84cbefe128ffe308c16ce0f
6
+ metadata.gz: e2ef9fe01a46227536a49a0e0190dc63c1566f8a0de333b3357e1761a0c8f5247fd6f0d8b0e302f933ca25b75637abeb4314fb88e965c161909c504b36ab9165
7
+ data.tar.gz: 70a4d044459a65829395aa9abb7a114eaedad05d3e29d65d7ab2d2a2d0f20e6c9b49858059d9dadac412416e9578c3a251d47ce37f06e0705b9a2f7784128035
data/Readme.md ADDED
@@ -0,0 +1,51 @@
1
+ Make after_commit callbacks fire in tests for Rails 3+ with transactional_fixtures = true.
2
+
3
+ Install
4
+ =======
5
+
6
+ gem install test_after_commit
7
+
8
+ # Gemfile (never include in :development !)
9
+ gem 'test_after_commit', :group => :test
10
+
11
+ Usage
12
+ =====
13
+ Test that the methods get called or the side-effect of the methods, something like:
14
+
15
+ ```Ruby
16
+ class Car < ActiveRecord::Base
17
+ after_commit :foo, :on => :update
18
+
19
+ def foo
20
+ $foo = 1
21
+ end
22
+ end
23
+
24
+ ...
25
+
26
+ it "sets $foo on commit" do
27
+ $foo.should == nil
28
+ car.save!
29
+ $foo.should == 1
30
+ end
31
+ ```
32
+
33
+ TIPS
34
+ ====
35
+ - hooks do not re-raise errors (with or without this gem) use [after_commit_exception_notification](https://github.com/grosser/after_commit_exception_notification)
36
+
37
+ Author
38
+ ======
39
+
40
+ Inspired by https://gist.github.com/1305285
41
+
42
+ ### [Contributors](https://github.com/grosser/test_after_commit/contributors)
43
+ - [James Le Cuirot](https://github.com/chewi)
44
+ - [emirose](https://github.com/emirose)
45
+ - [Brad Gessler](https://github.com/bradgessler)
46
+ - [Rohan McGovern](https://github.com/rohanpm)
47
+
48
+ [Michael Grosser](http://grosser.it)<br/>
49
+ michael@grosser.it<br/>
50
+ License: MIT<br/>
51
+ [![Build Status](https://travis-ci.org/grosser/test_after_commit.png)](https://travis-ci.org/grosser/test_after_commit)
@@ -1,3 +1,3 @@
1
1
  module TestAfterCommit
2
- VERSION = '0.2.4'
2
+ VERSION = '0.2.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_after_commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Grosser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-04 00:00:00.000000000 Z
11
+ date: 2014-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -100,6 +100,7 @@ executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
+ - Readme.md
103
104
  - lib/test_after_commit.rb
104
105
  - lib/test_after_commit/version.rb
105
106
  homepage: https://github.com/grosser/test_after_commit