From 29df8716de5976406d8201a89e31a6d3f34c9f15 Mon Sep 17 00:00:00 2001 From: Michael Miller Date: Thu, 18 Apr 2019 19:32:24 -0600 Subject: [PATCH] Fixes and tweaks for Crystal 0.28 Bump version to 0.5.1 --- shard.yml | 4 ++-- src/spectator/dsl/structure_dsl.cr | 4 ++-- src/spectator/expectations/block_expectation_partial.cr | 4 ++-- src/spectator/expectations/value_expectation_partial.cr | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/shard.yml b/shard.yml index 54be203..2ef3fa0 100644 --- a/shard.yml +++ b/shard.yml @@ -1,12 +1,12 @@ name: spectator -version: 0.5.0 +version: 0.5.1 description: | A feature-rich spec testing framework for Crystal with similarities to RSpec. authors: - Michael Miller -crystal: 0.27.2 +crystal: 0.28.0 license: MIT diff --git a/src/spectator/dsl/structure_dsl.cr b/src/spectator/dsl/structure_dsl.cr index ad031ac..f7da0e2 100644 --- a/src/spectator/dsl/structure_dsl.cr +++ b/src/spectator/dsl/structure_dsl.cr @@ -812,7 +812,7 @@ module Spectator::DSL # so the same value is returned with consecutive calls. # # ``` - # let(current_time) { Time.now } + # let(current_time) { Time.utc } # # it "lazy evaluates" do # now = current_time @@ -893,7 +893,7 @@ module Spectator::DSL # 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 # now = current_time diff --git a/src/spectator/expectations/block_expectation_partial.cr b/src/spectator/expectations/block_expectation_partial.cr index f9a8f6f..3adbec7 100644 --- a/src/spectator/expectations/block_expectation_partial.cr +++ b/src/spectator/expectations/block_expectation_partial.cr @@ -11,14 +11,14 @@ module Spectator::Expectations # Creates the expectation partial. # The label should be a string representation of the block. # 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) end # Creates the expectation partial. # The label is generated by calling to_s on the block. # 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("", source_file, source_line) end end diff --git a/src/spectator/expectations/value_expectation_partial.cr b/src/spectator/expectations/value_expectation_partial.cr index a732701..791bce5 100644 --- a/src/spectator/expectations/value_expectation_partial.cr +++ b/src/spectator/expectations/value_expectation_partial.cr @@ -10,14 +10,14 @@ module Spectator::Expectations # Creates the expectation partial. # The label should be a string representation of the actual value. # 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) end # Creates the expectation partial. # The label is generated by calling `to_s` on the actual value. # 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) end end