neo4jrb / activegraph

An active model wrapper for the Neo4j Graph Database for Ruby.
http://neo4jrb.io
MIT License
1.4k stars 276 forks source link

added test to demonstrate issue 1466 #1498

Closed anamba closed 5 years ago

anamba commented 6 years ago

Hey, why wait? Here's that first pull request I promised.

Not sure if this is the right place or right way to test this case, but I thought it'd be a good way to show what I'm seeing.

cheerfulstoic commented 6 years ago

Hey! Thanks for this and sorry for not getting back sooner.

I'm not sure that this test is checking the right thing or not. I tried removing include Neo4j::UndeclaredProperties from the PersonWithTimestamps definition and it still was failing.

Looking at the timestamped model definition (spec/shared_examples/timestamped_model.rb), it looks like there are some examples from those examples which depend on the a and b properties existing. When I set those properties on the model the tests seem to pass.

Please let me know if I'm missing something

klobuczek commented 5 years ago

@anamba indeed the timestamped model shared example requires too much context. So far there is a single usage of it. The shared_example would have to first made more generic and reusable. But if you see an issue in the code rather than spec I would suggest to formulate a new spec from scratch to demonstrate it. Unless of course you want to fix the shared_example first which would be appreciated.

anamba commented 5 years ago

Wow, blast from the past. :-) Sorry, but I no longer use this gem (using Elixir for new projects these days).