Closed mohideen closed 6 years ago
Associated PR #49
Instead of changed?
you might just be sure @changed_attributes
is not nil, or responds to #clear?
Also, practice is to add a test case in /spec and coverage should not drop significantly.
@gkellogg Thanks for your feedback! I have updated the PR accordingly.
As a side note, I don't fully understand the coverage stats. When I run the tests locally (ruby 2.4), the develop branch has 78.86% and the patch-1 branch has 89.55%. Also, the spec fails if it is run with jruby.
Travis runs specs with CI=true
. Note tests still failing on Travis, and should for you locally too.
Jruby has been a problem for all RDF gems, and results are allowed to fail.
Related to #47 which should solve this issue once the patch is provided. So I close this issue.
The reset_changes method is the base.rb is throwing
nil:NilClass
when trying to clear the@changed_attributes
https://github.com/ruby-rdf/spira/blob/5cfaa9c5d226ee170020d767122cf86e8a62b723/lib/spira/base.rb#L288
Context: The problem occurs when RDF URI is requested to be modeled
as
a class which is an extension of the Spira::Base class.The error does not happen if change the following code
to
Is this a bug in the code or am I not using this correctly?