如何从Rails单元中的测试/夹具yml文件加载测试数据
fixtures/xxxs.yml
- one:
clm1: test
clm2: test
test/unit/xxx.rb
test "load_yml_obj" do
assert_not_nil xxxs(:one)
end
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.