Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: string diffs when comparing strings #41

Open
olerass opened this issue Feb 7, 2014 · 1 comment
Open

Feature: string diffs when comparing strings #41

olerass opened this issue Feb 7, 2014 · 1 comment

Comments

@olerass
Copy link

olerass commented Feb 7, 2014

It would be really neat if rspec-given could display the diffs when two strings are compared in a Then or And. So for example instead of this:

Then expression failed at [...]
expected: "Hello how are you today!"
to equal: "Helio how are you today!"
  false            <- str1 == str2
  "Hello how are you today!"          <- str1
  "Helio how are you today!"   <- str2

It would display the strings diffed next to/below each other and maybe even color coded according to differences. E.g. the example at the bottom here is quite nice: http://drasticcode.com/2010/11/26/the-easiest-way-to-diff-two-strings-in-ruby

@jirutka
Copy link

jirutka commented Dec 2, 2014

+1, I recommend to use Diffy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants