有没有办法将夹具转换为一组 ActionController::Parameters?
例如:
# contacts.yml
dan:
first_name: Dan
last_name: Gebhardt
email: dan@example.com
notes: Writes sample code without tests :/
joe:
first_name: Joe
last_name: Blow
email: joe@example.com
notes: Lousy plumber
# contacts_test.rb
@dan = contacts(:dan)
# create params that represent Dan?
@dan_as_params = ActionController::Parameters.new(???)
任何和所有的帮助表示赞赏。