Change Anything to only use case equality

This commit is contained in:
Michael Miller 2021-02-09 21:18:20 -07:00
parent f46856f307
commit 7a5f7adfc2
No known key found for this signature in database
GPG key ID: FB9F12F7C646A4AD
2 changed files with 1 additions and 37 deletions

View file

@ -4,25 +4,14 @@ module Spectator
# Can be used like so:
# ```
# anything = Spectator::Anything.new
# array = ["foo", anything]
# expect(["foo", "bar"]).to eq(array)
# expect("foo").to match(anything)
# ```
struct Anything
# Always returns true.
def ==(other)
true
end
# Always returns true.
def ===(other)
true
end
# Always returns true.
def =~(other)
true
end
# Displays "anything".
def to_s(io)
io << "anything"