Rails Rails 2.3.x 下想使用 Rspec 的 mock_model 有什么办法吗?

yzhrain · November 13, 2012 · Last by yzhrain replied at November 13, 2012 · 2668 hits

Rails 2.3.x 下想使用 Rspec 的 mock_model 有什么办法吗?

暂时还不能升级到 3.x,但是想使用 Rspec 写测试,又不想依赖数据库数据,所以...

2.3.x 时候也能用 mock_model 啊。

#1 楼 @zhenning 多谢,被误导了,mock 这套东西一直都有的,2.0 只是把模块分得更加清楚而已,很久没写,什么都忘记了。

You need to Sign in before reply, if you don't have an account, please Sign up first.