sconover/wrong
View on GitHub ↗ ★ 436 Ruby
Wrong provides a general assert method that takes a predicate block. Assertion failure messages are rich in detail.
4 mentions on Hacker News by 2 people: 0 stories, 4 comments · first 2013-03-21 · latest 2021-05-09
20082026
-
I’m surprised the approach of https://github.com/sconover/wrong never caught on where you just write assert { x == y } and it inspects the values you’re comparing and the methods you’re using to generate the appropriate error messages and,…
comment by hombre_fatal · 2021-05-09 · in History of RSpec -
I use https://github.com/sconover/wrong with MiniTest which might qualify as another example of Ruby "tricks" to achieve a different interpretation of expressiveness. The result is the ability to express assert { :apple == :orange } assert…
comment by danneu · 2013-12-28 · in Rust is surprisingly expressive -
…will look like" and "my source code definitely needs this and this is its API". In Ruby, I like https://github.com/sconover/wrong .
comment by danneu · 2013-09-01 · in Clojure and Testing -
…what kind of error output to show me. The ONLY solution I've found is a library called Wrong ( https://github.com/sconover/wrong ) and it works with both Minitest and Rspec. It lets you write assertions like this: include Wrong assert {…
comment by danneu · 2013-03-21 · in Learn how to test Rails using Test::Unit instead of Rspec