Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added more specs for cascading #88

Merged
merged 6 commits into from Dec 12, 2011

Conversation

@dnagir
Copy link
Contributor

commented Dec 12, 2011

This adds coule more specs for cascading.

One is failing "validation before saving".

context "and validating before saving" do
before { google.valid? }
let(:google_data) { {:leader => brin} }
its(:persisted?) { should be_true }

This comment has been minimized.

Copy link
@dnagir

dnagir Dec 12, 2011

Author Contributor

This one is failing with Can't save start_node #<Kernel::Model_15:0x1783ddd> id 23

@dnagir

This comment has been minimized.

Copy link
Contributor Author

commented Dec 12, 2011

I have added couple more failing specs to this PR.

@andreasronge andreasronge merged commit 259c342 into neo4jrb:master Dec 12, 2011

@andreasronge

This comment has been minimized.

Copy link
Member

commented Dec 12, 2011

Your example spec now works, but the callback will be called twice since the relationships are changed inside a callback method (before_validation in the example)

@dnagir

This comment has been minimized.

Copy link
Contributor Author

commented Dec 13, 2011

Thanks a lot Andreas. It does work indeed now.

What do you mean called twice, which callback?

If you are talking about calling save twice then it's absolutely fine and expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.