running rspec in ruby project does not work (runs Test::Unit)

Hi,

I'm using RubyMine 2017.1 and now when I try to run rspec test with right click on file it starts Test::Unit instead of rspec.

It worked nice in all previous versions of RubyMine. This also means that we didn't change anything in our Gemfile and Gemfile.lock.

Please advise how to fix this since it's really annoying.

My env:

Ruby 2.3.3

Rails 4.1.16

rspec 3.4.0

To reproduce:

1. right click on spec file

2. choose option Run test...

3. it creates new configuration in Run Configurations but under Test::Unit/Shoulda/Minitest

It should be created under RSpec configurations as it was before.

 

Thanks,

Sinisa.

4
6 comments
Avatar
Permanently deleted user

Found the solution:

https://blog.jetbrains.com/ruby/2017/03/rubymine-2017-1-1-eap-bug-fix-update/

 

A colleague who had the same problem installed the update and confirms it solves the issue

1
Avatar
Permanently deleted user

I have this same issue. 

0

Same here. Very annoying indeed. 

I have tried to delete all the related config entries from the run dialog but it didn't help. In my case, it happens with all the "*_spec.rb" files under "/features". 

 

0
Avatar
Permanently deleted user

Same problem here, there is a workaround but this has to be done for each test... which is just not an option for me. First of all delete the config entries (Run > Edit configurations), so delete everything belonging to Test::Unit/Shoulda/Minitest. Then in your test you wish to run do Shift+Alt+F10, here select the correct configuration, so the one with the RSpec icon (not with the red gem, but with the document icon on it). Then it works fine for me.

But this is just no doable for each and every test, still need help please. I want it to run default as rspec, not as test

 

edit: uninstalled RubyMine 2017 and reinstalled 2016, everything works again as it should

0
Avatar
Permanently deleted user

Thanks Yves!

I just installed eap and it works fine when I try to run specs for one file:

1. right click on _spec.rb file

2. choose option Run spec...

But, it doesn't work if I want to run single test:

1. right click on single test IN file

2. choose Run spec...

3. it runs all tests in _spec.rb file

Thanks,

Sinisa.

0

@Sinisa,

there was another issue related to Rspec running (https://youtrack.jetbrains.com/issue/RUBY-19417), but it should be fine in the last 2017.1.2 version.

0

Please sign in to leave a comment.