Giter Club home page Giter Club logo

rails-run-spec-vscode's Introduction

rails-run-spec-vscode

This extension provides basic commands for running spec files in build-in vscode terminal.

Features

Available commands:

[
  {
    "command": "extension.runAllSpecFiles",
    "title": "Run All Specs",
    "key": "cmd+ctrl+r"
  },
  {
    "command": "extension.runFileSpecs",
    "title": "Run File Specs",
    "key": "cmd+ctrl+t"
  },
  {
    "command": "extension.runSpecLine",
    "title": "Run Spec Line",
    "key": "cmd+ctrl+l"
  },
  {
    "command": "extension.runLastSpec",
    "title": "Run Last Spec",
    "key": "cmd+ctrl+y"
  }
]

Sidebar Option

There is an option to run any file or folder specs from sidebar. Right click an folder or spec file and choose Run Specs option.

Infer Spec Files

There is posibility to run specs for currently open file, the extension will try to guess the path using Rails convention:

app/controllers/test_controller.rb => spec/controllers/test_controller_spec.rb.

Minitest support

In order to run *_test files the ruby.specPattern needs to be set to test in the Vscode settings.

Extension Settings

This extension contributes the following settings:

"ruby.specCommand": {
    "type": "string",
    "default": "",
    "description": "Defines a custom command to run for specs (i.e. 'spring rspec')"
},
"ruby.specGem": {
    "type": "string",
    "default": "rspec",
    "description": "Defines the type of tool used for testing",
    "enum": [
        "rspec",
        "zeus"
    ]
},
"ruby.specPattern": {
    "type": "string",
    "default": "spec",
    "description": "Defines the pattern for seaching test files",
    "enum": [
        "spec",
        "test"
    ]
},
"ruby.zeusStartTimeout": {
    "type": "number",
    "description": "Wait time neccessary on spec first run.
        Zeus gem requries a certain period to start",
    "default": 2000
}
"ruby.specFocusTerminal": {
    "type": "boolean",
    "default": true,
    "description": "Defines if it should focus on terminal on each spec run"
}
"ruby.specClearTerminal": {
    "type": "boolean",
    "default": true,
    "description": "Defines if it should clear the terminal on each spec run"
}
"ruby.specSaveFile": {
    "type":"boolean",
    "default": false,
    "description": "Auto Save file before running spec test"
}

rails-run-spec-vscode's People

Contributors

noku avatar methyl avatar andy-j avatar dependabot[bot] avatar alexhof-shyftplan avatar pallinder avatar henriquemorato avatar jemmyw avatar coderob avatar tmandke avatar jared-thoughtbot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.