To add a collaborator to this project you will need to use the Relish gem to add the collaborator via a terminal command. Soon you'll be able to also add collaborators here!
More about adding a collaboratordefine diffable matcher
When a matcher is defined as diffable, the output will include a diff of the submitted
objects when the objects are more than simple primitives.
- Scenarios
-
- define a diffable matcher
-
- Given
-
a file named "diffable_matcher_spec.rb" with:
RSpec::Matchers.define :be_just_like do |expected| match do |actual| actual == expected end diffable end RSpec.describe "two\nlines" do it { is_expected.to be_just_like("three\nlines") } end
- When
-
I run
rspec ./diffable_matcher_spec.rb
- Then
-
it should fail with:
Diff: @@ -1,3 +1,3 @@ -three +two lines
Last published over 7 years ago by myronmarston.