Where can I find good examples of testing a Thor script with RSpec?

拟墨画扇 提交于 2019-12-08 14:40:03

问题


Where can I find good examples of testing a Thor script with RSpec?

My searches have so far not turned up anything good.


回答1:


Try out Thor's own repo at https://github.com/wycats/thor/tree/master/spec




回答2:


I'm trying to do rspec tests for thor in my homedir project (in the homedir3 branch, at the moment). Look in the CLI_spec.rb file.

I don't claim they are the paragon of unit tests but it's something to look at.



来源:https://stackoverflow.com/questions/7061988/where-can-i-find-good-examples-of-testing-a-thor-script-with-rspec

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!