mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Change Anything to only use case equality
This commit is contained in:
parent
f46856f307
commit
7a5f7adfc2
2 changed files with 1 additions and 37 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue