Fixes and tweaks for Crystal 0.28

Bump version to 0.5.1
This commit is contained in:
Michael Miller 2019-04-18 19:32:24 -06:00
parent c7ec6b0287
commit 29df8716de
4 changed files with 8 additions and 8 deletions

View file

@ -1,12 +1,12 @@
name: spectator name: spectator
version: 0.5.0 version: 0.5.1
description: | description: |
A feature-rich spec testing framework for Crystal with similarities to RSpec. A feature-rich spec testing framework for Crystal with similarities to RSpec.
authors: authors:
- Michael Miller <icy.arctic.fox@gmail.com> - Michael Miller <icy.arctic.fox@gmail.com>
crystal: 0.27.2 crystal: 0.28.0
license: MIT license: MIT

View file

@ -812,7 +812,7 @@ module Spectator::DSL
# so the same value is returned with consecutive calls. # so the same value is returned with consecutive calls.
# #
# ``` # ```
# let(current_time) { Time.now } # let(current_time) { Time.utc }
# #
# it "lazy evaluates" do # it "lazy evaluates" do
# now = current_time # now = current_time
@ -893,7 +893,7 @@ module Spectator::DSL
# Unlike `#let`, the value is not cached and is recreated on each call. # Unlike `#let`, the value is not cached and is recreated on each call.
# #
# ``` # ```
# let!(current_time) { Time.now } # let!(current_time) { Time.utc }
# #
# it "lazy evaluates" do # it "lazy evaluates" do
# now = current_time # now = current_time

View file

@ -11,14 +11,14 @@ module Spectator::Expectations
# Creates the expectation partial. # Creates the expectation partial.
# The label should be a string representation of the block. # The label should be a string representation of the block.
# The block is stored for later use. # The block is stored for later use.
protected def initialize(@block : Proc(ReturnType), label, source_file, source_line) def initialize(@block : Proc(ReturnType), label, source_file, source_line)
super(label, source_file, source_line) super(label, source_file, source_line)
end end
# Creates the expectation partial. # Creates the expectation partial.
# The label is generated by calling to_s on the block. # The label is generated by calling to_s on the block.
# The block is stored for later use. # The block is stored for later use.
protected def initialize(@block : Proc(ReturnType), source_file, source_line) def initialize(@block : Proc(ReturnType), source_file, source_line)
super("<Proc>", source_file, source_line) super("<Proc>", source_file, source_line)
end end
end end

View file

@ -10,14 +10,14 @@ module Spectator::Expectations
# Creates the expectation partial. # Creates the expectation partial.
# The label should be a string representation of the actual value. # The label should be a string representation of the actual value.
# The actual value is stored for later use. # The actual value is stored for later use.
protected def initialize(@actual : ActualType, label, source_file, source_line) def initialize(@actual : ActualType, label, source_file, source_line)
super(label, source_file, source_line) super(label, source_file, source_line)
end end
# Creates the expectation partial. # Creates the expectation partial.
# The label is generated by calling `to_s` on the actual value. # The label is generated by calling `to_s` on the actual value.
# The actual value is stored for later use. # The actual value is stored for later use.
protected def initialize(@actual : ActualType, source_file, source_line) def initialize(@actual : ActualType, source_file, source_line)
super(@actual.to_s, source_file, source_line) super(@actual.to_s, source_file, source_line)
end end
end end