factory_girl causing RSpec spec to fail after Rails 4 upgrade -
i upgraded app rails 4 , several of rspec specs fail, in same way.
sql (82.3ms) insert "profiles" ("career_goal", "created_at", "email", "encrypted_password", "first_name", "gpa", "grad_year", "hidden", "keywords", "kind", "last_name", "major_names", "middle_name", "minor_names", "phone", "id", "research_interest", "updated_at") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["career_goal", ["illum et sunt.", "illo sapiente nesciunt reiciendis nulla fugit est autem."]], ["created_at", sat, 21 jun 2014 15:12:40 pdt -07:00], ["email", "madonna@huels.name"], ["encrypted_password", "$2a$10$y1zijhgoudy1ot4qhgnxr./fvxp9t7dhhvu4bofat5zbjrqjfisty"], ["first_name", "jayde"], ["gpa", #<bigdecimal:e684850,'0.25e1',18(36)>], ["grad_year", 2013], ["hidden", false], ["keywords", "daisha ea placeat debitis repellendus autem advertisement voluptas. illum et sunt. illo sapiente nesciunt reiciendis nulla fugit est autem. "], ["kind", "student"], ["last_name", "reilly"], ["major_names", "anthropology"], ["middle_name", "daisha"], ["minor_names", "sociology"], ["phone", "724-953-4023 x4372"], ["id", "01234567"], ["research_interest", "ea placeat debitis repellendus autem advertisement voluptas."], ["updated_at", sat, 21 jun 2014 15:12:40 pdt -07:00]] typeerror: can't cast array text: insert "profiles" ("career_goal", "created_at", "email", "encrypted_password", "first_name", "gpa", "grad_year", "hidden", "keywords", "kind", "last_name", "major_names", "middle_name", "minor_names", "phone", "id", "research_interest", "updated_at") values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) it looks sql phone call somehow malformed in of insert "profiles" ("fields", etc) values (?,?,?) insight why values part ?s appreciated. checked define :profile , doesn't seem faker issue had read elsewhere. (i have faker::lorem.words(4).join('-') doesn't give array or anything. active record problem? there anywhere else should looking errors or things need reconfiguring?
the question marks aren't problem; they're placeholders values.
this part of array of values
["career_goal", ["illum et sunt.", "illo sapiente nesciunt reiciendis nulla fugit est autem."]] indicates career_goal set array. alter single string (with join or rewriting it, whatever).
ruby-on-rails ruby-on-rails-4 rspec factory-girl
No comments:
Post a Comment