mirror of
https://gitea.invidious.io/iv-org/shard-spectator.git
synced 2024-08-15 00:53:35 +00:00
Add expectation class
This commit is contained in:
parent
0ade9f4dfd
commit
b709820e11
2 changed files with 12 additions and 4 deletions
|
@ -1,9 +1,5 @@
|
|||
require "./spectator/*"
|
||||
|
||||
def expect(actual : T) forall T
|
||||
pp actual
|
||||
end
|
||||
|
||||
# TODO: Write documentation for `Spectator`
|
||||
module Spectator
|
||||
VERSION = "0.1.0"
|
||||
|
|
12
src/spectator/expectation.cr
Normal file
12
src/spectator/expectation.cr
Normal file
|
@ -0,0 +1,12 @@
|
|||
def expect(actual : T) forall T
|
||||
Spectator::Expectation.new(actual)
|
||||
end
|
||||
|
||||
module Spectator
|
||||
class Expectation(T)
|
||||
getter actual : T
|
||||
|
||||
protected def initialize(@actual : T)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue