mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add return type annotations
Addresses Crystal compiler warning about abstract method return types.
This commit is contained in:
parent
adbfb7da7c
commit
43dc106c18
58 changed files with 146 additions and 139 deletions
|
@ -1,17 +1,17 @@
|
|||
# Example that always raises an exception.
|
||||
class ErroredExample < Spectator::RunnableExample
|
||||
# Dummy description.
|
||||
def what
|
||||
def what : Symbol | String
|
||||
"ERROR"
|
||||
end
|
||||
|
||||
# Dummy source.
|
||||
def source
|
||||
def source : ::Spectator::Source
|
||||
::Spectator::Source.new(__FILE__, __LINE__)
|
||||
end
|
||||
|
||||
# Dummy symbolic flag.
|
||||
def symbolic?
|
||||
def symbolic? : Bool
|
||||
false
|
||||
end
|
||||
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
# Example that always fails.
|
||||
class FailingExample < Spectator::RunnableExample
|
||||
# Dummy description.
|
||||
def what
|
||||
def what : Symbol | String
|
||||
"FAIL"
|
||||
end
|
||||
|
||||
# Dummy source.
|
||||
def source
|
||||
def source : ::Spectator::Source
|
||||
::Spectator::Source.new(__FILE__, __LINE__)
|
||||
end
|
||||
|
||||
# Dummy symbolic flag.
|
||||
def symbolic?
|
||||
def symbolic? : Bool
|
||||
false
|
||||
end
|
||||
|
||||
|
|
|
@ -6,17 +6,17 @@ class PassingExample < Spectator::RunnableExample
|
|||
end
|
||||
|
||||
# Dummy description.
|
||||
def what
|
||||
def what : Symbol | String
|
||||
"PASS"
|
||||
end
|
||||
|
||||
# Dummy source.
|
||||
def source
|
||||
def source : ::Spectator::Source
|
||||
::Spectator::Source.new(__FILE__, __LINE__)
|
||||
end
|
||||
|
||||
# Dummy symbolic flag.
|
||||
def symbolic?
|
||||
def symbolic? : Bool
|
||||
@symbolic
|
||||
end
|
||||
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
# This is useful for capturing what's going on when an event is running.
|
||||
class SpyExample < Spectator::RunnableExample
|
||||
# Dummy description.
|
||||
def what
|
||||
def what : Symbol | String
|
||||
"SPY"
|
||||
end
|
||||
|
||||
# Dummy source.
|
||||
def source
|
||||
def source : ::Spectator::Source
|
||||
::Spectator::Source.new(__FILE__, __LINE__)
|
||||
end
|
||||
|
||||
# Dummy symbolic flag.
|
||||
def symbolic?
|
||||
def symbolic? : Bool
|
||||
false
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue