Rename spec with class

When I refactor/rename a class or module, it would be nice if RubyMine offers to rename the RSpec spec for that module as well.

This is similar to, but different from the discussion in

Is there currently a way to do this?

For example - class Foobar

Spec - foobar_spec.rb

Rename Foobar to Bar in the IDE, then the filesystem looks like:

foobar.rb -> bar.rb

foobar_spec -> bar_spec.rb

Comment actions Permalink


what RubyMine version do you use? It appears to be a known problem already fixed (

Comment actions Permalink

2016.2.1 I think 11508 is a different issue. 11508 seems to deal with renaming references to the class inside the RSpec file.

I'm talking about renaming the RSpec file itself. It's also possible that issue is only relevant to Rails. In this case, I'm talking about a non-Rails Ruby project.

Comment actions Permalink

Indeed, it doesn't work with a non RoR app. I've created a corresponding request on our tracker, please vote for it:


Please sign in to leave a comment.