Rails Test Runner READMERun your rails tests smoothly from within Visual Studio Code Quickly run your testsRun them through menus as wellProject goalTo allow users to easily and quickly run either individual tests or the whole test suite in a rails project no matter if they use minitest, rspec or cucumber. FeaturesThe extension currently only supports rspec but should eventually support the most popular test runners. ConfigurationrailsTestRunner.rspecCommandConfigures what command will be used to execute the tests
railsTestRunner.clearTerminalIf set to true (default) the temrinal will be cleared on each new run.
railsTestRunner.focusTerminalIf set to true (default) the temrinal will be focused when a test run is being initiated
railsTestRunner.railsTestRunner.rspec.failFastIf set to true rspec will be run with --fail-fast meaning that execution will stop after first failed test is encountered (great to use in combination with running only failed tests)
FeaturesThe extension currently only supports rspec but should eventually support the most popular test runners. Run all tests in the currently opened filecmd-shift-p Or select the option via the context menu Run tests on current linecmd-shift-p Or select the option via the context menu Run last test(s)cmd-shift-p Run all tests in current folderRight click on folder in explorer menu and select Run all testscmd-shift-p Run only failing testsFor this to work you need to also configure your rspec setup to support saving the last failures to a text file. Please take a look at: https://relishapp.com/rspec/rspec-core/docs/command-line/only-failures After that is done simply run the command and you should only be running failed tests.
cmd-shift-p KeybindingsTo change your keyboard shortcuts, paste the rules in
Todo
|