一个文件里面有很多个 it,现在一个发现错误,如何只运行这一个 it,来调试什么的
加上 wip,用 rspec -t wip 运行 https://www.relishapp.com/rspec/rspec-core/v/2-4/docs/command-line/tag-option
@kingwkb sublime text 2 有 RubyTest https://github.com/maltize/sublime-text-2-ruby-tests.git
最近做 Ruby on Rails Tutorial 的教程,裡面有這樣的範例:
$ rspec spec/requests/user_pages_spec.rb -e "signup page"
書中的說明: The -e here arranges to run just the examples whose description strings match "signup page". Note in particular that this is not the substring "signup", which would run all the test
另外找到 Stackoverflow 上也有一篇:http://stackoverflow.com/questions/6518425/test-only-one-it-or-describe-with-rspec