How do you run a single test/spec file in RSpec?

前端 未结 14 1710
-上瘾入骨i
-上瘾入骨i 2020-12-12 08:45

I want to be able to run a single spec file\'s tests — for the one file I\'m editing, for example. rake spec executes all the specs. My project is not a

14条回答
  •  旧时难觅i
    2020-12-12 09:14

    The raw invocation:

    rake spec SPEC=spec/controllers/sessions_controller_spec.rb \
              SPEC_OPTS="-e \"should log in with cookie\""
    

    Now figure out how to embed this into your editor.

提交回复
热议问题