# with test_after_commit 0.0.1 below line create a friendship correctly
# with test_after_commit 0.1.0 it is returning nill
request = friend.friendships.create(friend_id: id, status: 'pending')
I use ruby 2.0, rails 3.2 and rspec last version
Took me a bit to understand this gem is my problem... It screws up has_many association creation.
A failing test-case would be very helpful!
rails new test_after_commit
echo "gem 'test_after_commit'" >> Gemfile
rails g model user name
rails g model authentication user:belongs_to
echo "class User; has_many :authentications; end" >> app/models/user.rb
u = User.create!
u.authentications.create! # => nil !!
a = u.authentications.new
a.id # => the id
0.1.1 should fix that!