I'm working on Rails 4 support for this library, and I've hit a small issue with a failing test case. I've tracked the problem back to the same test case failing on the master branch if the dependencies are updated.
I'm happy to continue investigating this, but I can't understand why the assertions in this test case are valid. I was hoping someone could shed some light on it for me.
1) Ripple::Associations::ManyReferenceProxy#keys maintains the list of keys properly as new documents are appended
Failure/Error: @account.payment_methods.should have(1).key
expected 1 key, got 3
# ./spec/ripple/associations/many_reference_proxy_spec.rb:148:in `block (3 levels) in <top (required)>'
As far as I can see, the @keys collection in ManyReferenceProxy doesn't get updated when << is called, so there will always be 3 keys (1, 2 and 3 as returned by the mock defined at line 120).
I'm working on Rails 4 support for this library, and I've hit a small issue with a failing test case. I've tracked the problem back to the same test case failing on the master branch if the dependencies are updated.
I'm happy to continue investigating this, but I can't understand why the assertions in this test case are valid. I was hoping someone could shed some light on it for me.
The failure is many_reference_proxy_spec.rb:145:
As far as I can see, the
@keys
collection in ManyReferenceProxy doesn't get updated when<<
is called, so there will always be 3 keys (1, 2 and 3 as returned by the mock defined at line 120).Anyone able to offer some advice?