ruby - Active Record unexpected i18n error -
i building ruby project uses active record not rails. inside 1 of tests trying following: it "fails no driver name" command = "driver" expect {command_file.process_driver command}.to raise_error(activerecord::recordinvalid) end and here method trying call def process_driver command driver_name = command.split[1] driver.create! :name => driver_name end i expect passing :name => nil driver.create! should throw recordinvalid instead i18n::invalidlocaledata . here backtrace expected activerecord::recordinvalid, got #<i18n::invalidlocaledata: can not load translations /users/me/.rbenv/versions/2.3.1/lib/r...ems/activesupport-5.1.3/lib/active_support/locale/en.yml: expects return hash, not> backtrace: # ./command_file.rb:81:in `process_driver' # ./command_file.rb:63:in `block in process' # ./command_file.rb:51:in `each' # ./command_file.rb:51:in `each_with_index' # ./command_file.rb:51:in `process' # ./s...