assert_generator 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65c081e83d976a9f0120deeedaa3d6ebb395784aa678d51cf12c5e81803a1baf
4
- data.tar.gz: 6b3a772c932245b571b3dfdf1f22b49bfdb07f41faaa95f6860e54c5b4ace8a7
3
+ metadata.gz: 053f7053120b5b24d0f18500bf92830d3148f34f183bf725f46a72f25fe0044f
4
+ data.tar.gz: c68c7498bd4c2155c8d059a1d29ec9b1cb7da6e0bf8d29d027dc1fd665a76dd1
5
5
  SHA512:
6
- metadata.gz: 631a95c52aee8e6446ec26b808db9a98a7104a0ed78bebe5913a76df2331144d9b034941409ece16b7d78920c4ff2a31f572ddd2d104ea36b49df7e369df3a29
7
- data.tar.gz: 6ee2a4b51a2ef2d86fc69ee0849a61294b81dbc601d67c1463970524c3c714e903a43395bdf2c85e5b3507117fcd9013f59085e8a284e0c334ee99b732aa104c
6
+ metadata.gz: 7f75eea249badbeac33e539f6ddc3a406319adec57d1f2e64d2fe9c4a5c52456e3c2a53d7618956049e19b52a7e1837ac574eb993126824dde7238197af889d2
7
+ data.tar.gz: 166520d9d86b9d56b83d4692c177c272f224bc31c2879b5b5139b59fb31fc6d4f8add9747c98a1998e92cd74020a73a418f901607a3fea5bc0bf3909253b9b7b
@@ -80,7 +80,10 @@ module AssertGenerator
80
80
 
81
81
  def generate_asserts_hash(h, p)
82
82
  h.each do |k, v|
83
- generate_assert_drillable_item(v, ->(sym) { "#{p}[:#{sym}]" }, k)
83
+ generate_assert_drillable_item(v, ->(key) do
84
+ key_literal = key.is_a?(Symbol) ? ":#{key}" : "'#{key}'"
85
+ "#{p}[#{key_literal}]"
86
+ end, k)
84
87
  end
85
88
  end
86
89
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assert_generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Parratt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-11-17 00:00:00.000000000 Z
11
+ date: 2020-02-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -125,7 +125,6 @@ extensions: []
125
125
  extra_rdoc_files: []
126
126
  files:
127
127
  - lib/assert_generator.rb
128
- - lib/assert_generator/version.rb
129
128
  homepage:
130
129
  licenses:
131
130
  - MIT
@@ -146,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
146
145
  - !ruby/object:Gem::Version
147
146
  version: '0'
148
147
  requirements: []
149
- rubygems_version: 3.0.3
148
+ rubygems_version: 3.0.6
150
149
  signing_key:
151
150
  specification_version: 4
152
151
  summary: An assert generating gem.
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module AssertGenerator
4
- VERSION = '0.1.1'
5
- end