开发者

How to load test data from test/fixtures yml file in Rails units

How to load test 开发者_运维知识库data from test/fixtures yml file in Rails units


fixtures/xxxs.yml

- one:
    clm1: test
    clm2: test

test/unit/xxx.rb

test "load_yml_obj" do
  assert_not_nil xxxs(:one)
end
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜