I am trying to load a fixture for my tests which has a password column (binary datatype). The tool i am using uses EzCrypto gem for encrypting and decrypting passwords before they are stored/retrieved. Now if my column is binary i thought rails would automatically store the password as encrypted - but all i get is:
1) Error:
test_is_working(FirstTest):
RuntimeError: Failed to decode the field. Incorrect key?
/Library/Ruby/Gems/1.8/gems/mislav-will_paginate-2.3.11/lib/will_paginate/finder.rb:170:in method_missing'
unit/first_test.rb:8:in
setup'
2) Error: test_sanity(FirstTest): RuntimeError: Failed to decode the field. Incorrect key? unit/first_test.rb:8:in `setup'
Fixture file looks like this:
first_hussle:
type: FirstAccount
user: jsewq
username: [email protected]
password: 'abc123'
any clues?