开发者

howto spec not all models

I know

rake spec:models

to spec all models.

Is there a way to spec only one model, or only a given collection of models? Something like this would be desirable:

rake spec:model user

or with a collection of models

rak开发者_运维技巧e spec:model user role order

BTW: Brian Hogan wrote created something similar (see here) but maybe there is something built-in in rspec2


use the rspec command line ( with Rspec 2)

rspec spec/models/user_spec.rb

or if you want several

rspec spec/models/user_spec.rb spec/models/role_spec.rb

If you want a task for that create. it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜