olimorris / neotest-rspec

🧪 Neotest adapter for RSpec. Works in Docker containers too
MIT License
88 stars 25 forks source link

test: allow for testing of all rspec scenarios #38

Closed olimorris closed 1 year ago

olimorris commented 1 year ago

This PR should allow us to test all of the RSpec examples included within this adapter, automatically using Plenary. It is heavily inspired by the way that Refactoring.nvim works.

Currently, we have a directory of RSpec tests which we manually test against to verify that the adapter is working as intended. This is currently done manually and is incredibly time consuming. Also, if a user adds a test case that the adapter doesn't work with, you enter into the world of restarting Neovim over again and triggering neotest.

This PR proposes that each of the files in the RSpec tests dir has the following accompaniments:

Within a Plenary test file, we loop through all of the the files in the RSpec tests dir and assert that the output from running :lua require("neotest").run.run() matches that in the *.expected file.