-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into feat/date-like-objects-support
- Loading branch information
Showing
7 changed files
with
87 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 0 additions & 21 deletions
21
lib/super_diff/errors/no_diff_formatter_available_error.rb
This file was deleted.
Oops, something went wrong.
22 changes: 0 additions & 22 deletions
22
lib/super_diff/errors/no_operational_sequencer_available_error.rb
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
require "spec_helper" | ||
|
||
RSpec.describe "Integration with RSpec's magic metadata", type: :integration do | ||
it "includes extra_failure_lines in failure messages" do | ||
as_both_colored_and_uncolored do |color_enabled| | ||
snippet = <<~TEST.strip | ||
RSpec.describe "test" do | ||
it { expect(true).to be(false) } | ||
after do | ||
RSpec.current_example.metadata[:extra_failure_lines] = "foo\nbar" | ||
end | ||
end | ||
TEST | ||
program = | ||
make_plain_test_program( | ||
snippet, | ||
color_enabled: color_enabled, | ||
preserve_as_whole_file: true | ||
) | ||
|
||
expected_output = | ||
build_expected_output( | ||
color_enabled: color_enabled, | ||
test_name: "test is expected to equal false", | ||
snippet: "it { expect(true).to be(false) }", | ||
expectation: | ||
proc do | ||
line do | ||
plain "Expected " | ||
actual "true" | ||
plain " to equal " | ||
expected "false" | ||
plain "." | ||
end | ||
end, | ||
extra_failure_lines: | ||
proc do | ||
indent by: 5 do | ||
line "foo" | ||
line "bar" | ||
end | ||
end | ||
) | ||
|
||
expect(program).to produce_output_when_run(expected_output).in_color( | ||
color_enabled | ||
) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters