Skip to content

New differ #94

@benoittgt

Description

@benoittgt

Hello

Few people express the lack of clear informations with the RSpec diff output. As expressed [1][2]. @myronmarston explained the issue with diff-lcs and why we should use a new matcher for RSpec dedicated to RSpec semantics.

A differ written for RSpec, that understands the semantics of RSpec matching, would produce far better output. - source

List of issues with current differ

Gems that try to improve the differ

Attempt tried


I planned long time ago to port the differ that is included with Elixir's ExUnit but didn't do it because of lack of time.

I am wondering what we are trying to do, what are the expectations. I have listed few issues with the current differ below. I think super-diff by @mcmire is a good start but the dependency should be dedicated to RSpec and deal with more types of objects.

I would love to work and get help on this subject for RSpec 4 but I need to know the expectations.
For example get rid of diff-lcs and create a new RSpec gem that will include diff mechanism plus a new ObjectFormater but only to output diff of expected VS actual?

At the moment it is difficult to change ObjectFormater.

The ObjectFormatter is currently used in several ways, to format objects for descriptions etc, and to format them for expected / actual [source]

My last attempt to improve only string diff was a failure because ObjectFormater is used in various place and I had many failing tests in different RSpec gems.

Maybe we should first create a new class that will include diff mechanism (start with diff-lcs) plus a new ObjectFormater for actual/expected diff? For the end user it will mean no changes but for us it will be easier to start to work on a better diff output for RSpec 4?

"for each desired change, make the change easy (warning: this may be hard), then make the easy change"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions