Skip to content

Toggling between spec and implementation is broken in some cases #157

@dgtized

Description

@dgtized

I started trying to write a test case for this and then ran into some difficulty modeling the file system.

Basically if you have a spec file spec/lib/foo_spec.rb and the implementation lib/foo.rb, running C-c , t to flip from the spec to the implementation works, but switching from the implementation to the test fails (it tries to generate spec/foo_spec.rb even though the spec/lib/foo_spec.rb exists).

I traced it down to rspec-target-file-for considers multiple candidates, but rspec-spec-file-for doesn't look at candidates.

I know there is some dispute on if spec/lib should even exist, but it seems like we should do candidate search in both directions if possible?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions