Files
metasploit-gs/spec/support/shared/examples/hash_with_insensitive_access.rb
T
Luke Imhoff 6f29e9a4cf .should == -> expect().to eq
MSP-13484
2015-12-10 21:47:22 -06:00

22 lines
633 B
Ruby

shared_examples_for "hash with insensitive keys" do
it "should store with insensitive key" do
subject["asdf"] = "foo"
subject["ASDF"] = "bar"
expect(subject["asdf"]).to eq "bar"
expect(subject["ASDF"]).to eq "bar"
end
it "should fetch with insensitive key" do
subject["foo"] = "bar"
expect(subject["foo"]).to eq "bar"
expect(subject["Foo"]).to eq "bar"
expect(subject["FOo"]).to eq "bar"
expect(subject["FOO"]).to eq "bar"
expect(subject["fOO"]).to eq "bar"
expect(subject["fOo"]).to eq "bar"
expect(subject["FOo"]).to eq "bar"
expect(subject["Foo"]).to eq "bar"
end
end