Add return type annotations

Addresses Crystal compiler warning about abstract method return types.
This commit is contained in:
Michael Miller 2019-09-23 20:32:21 -06:00
parent adbfb7da7c
commit 43dc106c18
58 changed files with 146 additions and 139 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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