You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have several failures that have popped up in our unit-test cases (rspec) after upgrading to Rails 4, largely related to the revisions and versions array being empty during execution that would previously have had no issues during Rails 3 execution and testing. Here is an example of one for versions :
Failure/Error: revisions = cause["revisions"]
NoMethodError:
undefined method `[]' for nil:NilClass
I'm aware these are not very descriptive -- but this is because the ONLY change in circumstance is Rails 4 vs. Rails 3. We have tried many different things and are convinced that only two things could be the issue : this gem, or the paper_trail gem (of which we tried several different versions and there was no change).
Steps to reproduce
(e.g., detailed walkthrough, runnable script, example application)
We simply ran our test suite in Rails 4 which now have a bunch of failures vs. Rails 3 which did not have these failures.
Environment
ActiveModelSerializers Version (commit ref if not on tag):
0.8.4 (although also tried upgrading to 0.10.x and the exact same issue persisted).
Expected behavior vs actual behavior
We have several failures that have popped up in our unit-test cases (rspec) after upgrading to Rails 4, largely related to the
revisions
andversions
array being empty during execution that would previously have had no issues during Rails 3 execution and testing. Here is an example of one for versions :Failure/Error: risk1.versions.last.update_attribute(:created_at, Date.today - 1.day)
NoMethodError:
undefined method `update_attribute' for nil:NilClass
and a couple for revisions :
Failure/Error: expect(revisions.length).to eq(6) Now @josevalim can stop to fight with textile #1 model, 5 associations
expected: 6
got: 0
(compared using ==)
Failure/Error: revisions = cause["revisions"]
NoMethodError:
undefined method `[]' for nil:NilClass
I'm aware these are not very descriptive -- but this is because the ONLY change in circumstance is Rails 4 vs. Rails 3. We have tried many different things and are convinced that only two things could be the issue : this gem, or the paper_trail gem (of which we tried several different versions and there was no change).
Steps to reproduce
(e.g., detailed walkthrough, runnable script, example application)
We simply ran our test suite in Rails 4 which now have a bunch of failures vs. Rails 3 which did not have these failures.
Environment
ActiveModelSerializers Version (commit ref if not on tag):
0.8.4 (although also tried upgrading to 0.10.x and the exact same issue persisted).
Output of
ruby -e "puts RUBY_DESCRIPTION"
:ruby 2.3.3p222 (2016-11-21 revision 56859) [x64-mingw32]
OS Type & Version:
Windows 10 (but we deploy on CentOS, which we have also tested and the exact same failures result)
Integrated application and version (e.g., Rails, Grape, etc):
Backtrace
(e.g., provide any applicable backtraces from your application)
Additonal helpful information
(e.g., Gemfile.lock, configurations, PR containing a failing test, git bisect results)
The text was updated successfully, but these errors were encountered: