We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56a07fe commit bbbf63eCopy full SHA for bbbf63e
1 file changed
spec/property_string_spec.rb
@@ -4,7 +4,7 @@
4
5
module Collections
6
def a_hash
7
- {:a => 123}
+ {:a => 123, 1 => "you got an int"}
8
end
9
10
def an_array
@@ -159,6 +159,11 @@ def baz
159
expect(ps["foo.bar.baz"]).to eq 123
160
161
162
+ it "returns the object's value for an integer key" do
163
+ ps = PropertyString.new(Obj.new)
164
+ expect(ps["foo.a_hash.1"]).to eq "you got an int"
165
+ end
166
+
167
it "returns the object's value for an array index" do
168
ps = PropertyString.new(Obj.new)
169
0 commit comments