Code Monkey home page Code Monkey logo

neotest-minitest's Introduction

neotest-minitest

This plugin provides a minitest adapter for the Neotest framework.

๐Ÿ“ฆ Installation

Install with the package manager of your choice:

Lazy

{
  "nvim-neotest/neotest",
  lazy = true,
  dependencies = {
    ...,
    "zidhuss/neotest-minitest",
  },
  config = function()
    require("neotest").setup({
      ...,
      adapters = {
        require("neotest-minitest")
      },
    }
  end
}
Packer
use({
  'nvim-neotest/neotest',
  requires = {
    ...,
    'zidhuss/neotest-minitest',
  },
  config = function()
    require('neotest').setup({
      ...,
      adapters = {
        require('neotest-minitest'),
      }
    })
  end
})

๐Ÿ”ง Configuration

Default configuration

Note: You only need to the call the setup function if you wish to change any of the defaults

Show default configuration
adapters = {
  require("neotest-minitest")({
    test_cmd = function()
      return vim.tbl_flatten({
        "bundle",
        "exec",
        "ruby",
        "-Itest",
      })
    end,
  }),
}

The test command

The command used to run tests can be changed via the test_cmd option e.g.

require("neotest-minitest")({
  test_cmd = function()
    return vim.tbl_flatten({
      "bundle",
      "exec",
      "rails",
      "test",
    })
  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('%'))

๐ŸŽ 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 test.

To trigger the tests for the adapter, run:

make test

๐Ÿ‘ Thanks

Special thanks to Oli Morris and others for their work on neotest-rspec that inspired this adapter.

neotest-minitest's People

Contributors

zidhuss 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.