/neotest-rspec

Neotest adapter for RSpec

Primary LanguageLua

neotest-rspec

Tests

This plugin provides an RSpec adapter for the Neotest framework.

Neotest and RSPec

📦 Installation

Install the plugin using packer:

use({
  'nvim-neotest/neotest',
  requires = {
    ...,
    'olimorris/neotest-rspec',
  },
  config = function()
    require('neotest').setup({
      ...,
      adapters = {
        require('neotest-rspec'),
      }
    })
  end
})

🚀 Usage

NOTE: All usages of require('neotest').run.run can be mapped to a command in your config (this is not included and should be done by yourself).

Test single function

To test a single test, hover over the test and run require('neotest').run.run()

Test file

To test a file run require('neotest').run.run(vim.fn.expand('%'))

Test directory

To test a directory run require('neotest').run.run("path/to/directory")

Test suite

To test the full test suite run require('neotest').run.run("path/to/root_project") e.g. require('neotest').run.run(vim.fn.getcwd()), presuming that vim's directory is the same as the project root.

🎁 Contributing

This project is maintained by the Neovim Ruby community. Please raise a PR if you are interested in adding new functionality or fixing any bugs. When submitting a bug, please include an example spec that can be tested.

To trigger the tests for the adapter, run:

./scripts/test

👏 Thanks

A special thanks to the following contributers: