olimorris / neotest-rspec

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

when run @namespace on summary-window not running #53

Closed skmtkytr closed 1 year ago

skmtkytr commented 1 year ago

https://github.com/olimorris/neotest-rspec/blob/main/lua/neotest-rspec/init.lua#L125

I think, can be this conditions

  if position.type == "test" or position.type == "namespace"  then
    run_by_line_number()
  end

any reason, (position.type == "namespace" and vim.bo.filetype ~= "neotest-summary") to do?

olimorris commented 1 year ago

I'm not following what the issue is. Can you send over some steps to replicate?

skmtkytr commented 1 year ago

When I run the test from Neotest Summary windows with context or describe position, neither the line number nor the file name is passed to the rspec command.

olimorris commented 1 year ago

I don't think either can be inferred from the summary window. Or at least they couldn't be when I added that code.

Is it possible now? Open to any PRS to add it in.

olimorris commented 1 year ago

Coming to this again, I can run tests from the summary window:

Screen Shot 2023-08-07 at 22 30 03

Am I missing something?!

skmtkytr commented 1 year ago

what is problem?

skmtkytr commented 1 year ago

check your branch run on summary @namespace line test outputs.

olimorris commented 1 year ago

Can you send me a screenshot of your problem and some Ruby code you're testing? I don't see an issue here

skmtkytr commented 1 year ago

スクリーンショット 2023-08-08 17 09 13

スクリーンショット 2023-08-08 17 09 35

スクリーンショット 2023-08-08 17 10 14

when runnning on @namespace summary-window , run all spec. imo, it is better to have a line specified run here.

olimorris commented 1 year ago

...and merged! Thanks for the PR.