assert-diff
Version, currently 0.4.04 versions
- 0.4.0latestApr 21, 2021
- 0.3.0not indexedApr 28, 2021
- 0.2.0not indexedApr 28, 2021
- 0.1.0not indexedApr 28, 2021
github.com/YusukeHosonuma/assert-diff
Assert equals with readable diff report.
7 stars
1 dependent
License: MIT
Installation
# Add this to your shard.yml
dependencies:
assert-diff:
github: YusukeHosonuma/assert-diff
version: ~> 0.4.0Then run:
shards installshard.yml
- Crystal
1.0.0- License
- MIT
- Author
- Yusuke Hosonuma
Dependencies
Runtime Dependencies
- diff*github: MakeNowJust/crystal-diff
README
assert-diff
Assert equals with readable diff report.

Installation
-
Add the dependency to your
shard.yml:development_dependencies: assert-diff: github: YusukeHosonuma/assert-diff branch: main -
Run
shards install
Example
Use in specs:
require "assert-diff"
describe "README.md" do
pending "example" do
expected = Rectangle.new(Point.new(0, 1), 4, 7, "One\nTwo\nThree\nFour")
actual = Rectangle.new(Point.new(0, 0), 4, 3, "Zero\nOne\nTwo!!\nThree")
actual.should eq_diff expected # or use `eq_full_diff`
end
end
or use assert_diff and assert_diff_full.
assert_diff(before, after)
assert_diff_full(before, after)
Use to output:
print_diff(before, after)
print_diff_full(before, after)
Contributing
I don't think it can be used for edge cases.
Issues and PRs are welcome.
- Fork it (https://github.com/YusukeHosonuma/assert-diff/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Yusuke Hosonuma - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.4.0- Tagged
- Apr 21, 2021
- Commit
80da95847407- Crystal
1.0.0- Indexed
- yes
Dependents
Repository
github.com/YusukeHosonuma/assert-diff
Metadata
- Created
- Aug 13, 2026
- Updated
- Oct 30, 2026
- Synced
- Oct 30, 2026
- Versions
- 4