moxley / atom-ruby-test

Run Ruby tests, Rspec examples, and Cucumber features from Atom
MIT License
43 stars 36 forks source link

Tries to run a Cucumber .feature with rspec #59

Closed etlund closed 9 years ago

etlund commented 9 years ago

When I'm viewing a .feature file and I run Ruby Test: Test File (or any other Ruby Test command) it tries to run the feature using rspec instead of cucumber.

esparkman commented 9 years ago

@trevordjones how did you get cucumber tests working?

trevordjones commented 9 years ago

Hopefully this is just temporary - I ended up having to adjust my ruby-test settings so that my Rspec commands are mapped to Cucumber. Obviously it's inconvenient - if I wanted to then run Rspec tests, I have to switch it back over. I haven't heard of any progress on the issue yet.

JonCrawford commented 9 years ago

:+1: Same issue here.

travis-anderson commented 9 years ago

Yep, if you read the code, there is no implementation of any settings other than the Rspec ones. Misleading documentation and settings :-1:

moxley commented 9 years ago

cucumber-sample

It works for me.

@travis-anderson: I don't follow you.

etlund commented 9 years ago

(v 0.9.13) I am still not able to get it to run cucumber features. When I open a .feature file and run "Ruby Test: Test File" (or any of the other commands), it tries "Running test: rspec --tty features/homepage.feature" and blows up.

I uninstalled it, wiped the settings clean, reinstalled it and have the same problem. I've disabled all (non-core) packages with the same results.

I've also tried all kinds of command line variations in the settings: bundle exec cucumber --color {relative_path} spring cucumber --color {relative_path} bin/cucumber --color {relative_path}

I've also changed the rspec command line to "cucumber --color {relative_path}" and it still tries to run a feature file by calling "rspec --tty features/homepage.feature"

travis-anderson commented 9 years ago

@moxley What is the command to run cucumber tests? It's possible that something is messing up in the framework detection because when I run the 'test-file' command with a .feature file open, it still runs my configured Rspec File Command

wendelscardua commented 9 years ago

I don't know if I'm parsing it right, but it seems that, according to lib/source-info.coffee (line 114), ruby-test will run the test as rspec if the current project uses rspec... Except projects like the one I'm working with, which uses both rspec and cucumber. I think it should check filetype first, then project type (at least for single test runs).

moxley commented 9 years ago

https://github.com/moxley/atom-ruby-test/commit/0ab043123af8d2d7c8f6004a659181544a2c67ee fixes the scenario where a cucumber file wasn't being detected when a .rspec file is in the project. Thanks for your contribution to ruby-test!

etlund commented 9 years ago

Fixed! Thanks for chasing that down.