diff --git a/shard.yml b/shard.yml index 7ed0120..d97b9d5 100644 --- a/shard.yml +++ b/shard.yml @@ -6,7 +6,7 @@ authors: license: MIT -crystal: 0.24.2 +crystal: ">= 0.24.2, < 2.0.0" dependencies: stdio: diff --git a/src/have_files.cr b/src/have_files.cr index 22f7ef6..02f7bf9 100644 --- a/src/have_files.cr +++ b/src/have_files.cr @@ -28,7 +28,7 @@ module HaveFiles end end end - Dir.rmdir(path) + Dir.delete(path) else File.delete(path) end diff --git a/src/spec/expectation.cr b/src/spec/expectation.cr index 3fac00c..77869cd 100644 --- a/src/spec/expectation.cr +++ b/src/spec/expectation.cr @@ -5,7 +5,10 @@ require "file_utils" module HaveFiles::Spec struct Expectation @diff : String? - def diff; @diff.as(String); end + + def diff + @diff.as(String) + end def initialize(@expected_dir : String, @base_dir : String = "/tmp", @cleanup : Bool = true) end