Run rspec on VS Code

后端 未结 4 1144
日久生厌
日久生厌 2021-01-19 14:04

I have rspec test code like this

describe \'Utils\' do

  puts 1111
  describe \'#time_condition\' do
    puts 2221
    it do
      puts \'aaa\'
    end
             


        
4条回答
  •  日久生厌
    2021-01-19 14:22

    Here is version: 2.0.0 for Linux

    {
      // See https://go.microsoft.com/fwlink/?LinkId=733558
      // for the documentation about the tasks.json format
      "version": "2.0.0",
      "tasks": [
        {
          "label": "rspec - all",
          "type": "shell",
          "command": "$(which bundle) exec rspec",
          "group": "test",
        },
        {
          "label": "rspec - one file",
          "type": "shell",
          "command": "$(which bundle) exec rspec ${file}",
          "group": "test",
        },
        {
          "label": "rspec - focus",
          "type": "shell",
          "command": "$(which bundle) exec rspec ${file} --focus",
          "group": "test",
        }
    
      ]
    }
    

    Now run Ctrl+Shift+p and in menu: Tasks: ...

提交回复
热议问题