8000 Advice on extending transpec to handle conversion from RR syntax to RSpec · Issue #126 · yujinakayama/transpec · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Advice on extending transpec to handle conversion from RR syntax to RSpec #126
Open
@kjvarga

Description

@kjvarga

I'm using your awesome gem to upgrade a huge codebase's specs to use expect syntax rather than should. It would not be possible without this tool!

We also want to remove dependency on RR which we use for mocking/stubbing. Now RSpec is really good for that we want to use RSpec mocking.

I forked the gem to have it ignore mock and stub and not convert them to doubles. I want to extend it to convert these to RSpec syntax. It's going to be kinda complicated. And I welcome any advice you have on how to do this.

I don't have a good understanding of how the dynamic analysis is used in the translation phase of the gem.

Here's a sample of what RR syntax can look like:

    mock(User).find { raise 'called' }
    stub!.method_name
    mock!.method_name
    stub(Object.new).method_name.stub!.something
    stub(Object.new).method_name.mock!.something
    mock(Object.new).method_name.stub!.something
    mock!.something.stub!.else
    stub!.something.mock!.else

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

      0