Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write a spec that triggers the bug I'm trying to fix
The expectation is that the code won't trigger an exception, but it does: ActiveJSON::Base.create does not fail when the loaded JSON was empty Failure/Error: Empty.create() NoMethodError: undefined method `length' for nil:NilClass # ./lib/active_hash/base.rb:135:in `insert' # ./lib/active_hash/base.rb:497:in `save' # ./lib/active_hash/base.rb:174:in `create' # ./spec/active_json/base_spec.rb:51:in `block (3 levels) in <top (required)>'
- Loading branch information