Skip to content

Instantly share code, notes, and snippets.

@pmahoney
Created May 25, 2012 14:50
Show Gist options
  • Save pmahoney/2788538 to your computer and use it in GitHub Desktop.
Save pmahoney/2788538 to your computer and use it in GitHub Desktop.
activerecord test errors
... similar errors elided ...
16) Error:
test_writing_with_not_nullable_column_encoded_with_JSON(StoreTest):
ActiveRecord::SerializationTypeMismatch: Attribute was supposed to be a ActiveSupport::HashWithIndifferentAccess, but was a Hash
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/coders/yaml_column.rb:34:in `load'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/serialization.rb:38:in `unserialize'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/serialization.rb:29:in `unserialized_value'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/serialization.rb:19:in `type_cast'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/read.rb:83:in `block in read_attribute'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/read.rb:67:in `fetch'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/read.rb:67:in `read_attribute'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/read.rb:45:in `__temp__'
/home/pat/dev/ruby/rails/activemodel/lib/active_model/dirty.rb:145:in `attribute_change'
/home/pat/dev/ruby/rails/activemodel/lib/active_model/dirty.rb:119:in `block in changes'
/home/pat/dev/ruby/rails/activemodel/lib/active_model/dirty.rb:119:in `map'
/home/pat/dev/ruby/rails/activemodel/lib/active_model/dirty.rb:119:in `changes'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/attribute_methods/dirty.rb:23:in `save'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:241:in `block (2 levels) in save'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:294:in `block in with_transaction_returning_status'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/connection_adapters/abstract/database_statements.rb:192:in `transaction'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:208:in `transaction'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:291:in `with_transaction_returning_status'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:241:in `block in save'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:252:in `rollback_active_record_state!'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/transactions.rb:240:in `save'
/home/pat/dev/ruby/rails/activerecord-mine/lib/active_record/persistence.rb:45:in `create'
/home/pat/dev/ruby/rails/activerecord/test/cases/store_test.rb:7:in `block in <class:StoreTest>'
/home/pat/dev/ruby/rails/activesupport/lib/active_support/callbacks.rb:351:in `_run_callbacks_56213300'
/home/pat/dev/ruby/rails/activesupport/lib/active_support/callbacks.rb:75:in `run_callbacks'
/home/pat/dev/ruby/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:28:in `run'
17) Failure:
test_rollback_when_saving_a_frozen_record(TransactionTest) [/home/pat/dev/ruby/rails/activerecord/test/cases/transactions_test.rb:369]:
Expected: "can't modify frozen Hash"
Actual: "can't modify frozen hash"
3464 tests, 10515 assertions, 2 failures, 15 errors, 32 skips
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment