We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46f800d commit 5b1f519Copy full SHA for 5b1f519
lib/mspec/helpers/hash.rb
@@ -1,16 +1,20 @@
1
+require 'mspec/utils/deprecate'
2
+
3
class Object
4
# The following helpers provide a level of indirection for running the specs
5
# against a Hash implementation that has a different name than Hash.
6
7
# Returns the Hash class.
8
unless method_defined?(:hash_class)
9
def hash_class
10
+ MSpec.deprecate "hash_class", "Hash"
11
Hash
12
end
13
14
15
# Returns a new instance of hash_class.
16
def new_hash(*args, &block)
17
+ MSpec.deprecate "new_hash", "hash literals"
18
if block
19
hash_class.new(&block)
20
elsif args.size == 1
0 commit comments