Files
metasploit-gs/spec/support/shared/examples/hash_with_insensitive_access.rb
T

22 lines
639 B
Ruby
Raw Normal View History

2015-12-31 16:56:13 -06:00
RSpec.shared_examples_for "hash with insensitive keys" do
it "should store with insensitive key" do
subject["asdf"] = "foo"
subject["ASDF"] = "bar"
2015-10-20 11:30:38 -05:00
expect(subject["asdf"]).to eq "bar"
expect(subject["ASDF"]).to eq "bar"
end
it "should fetch with insensitive key" do
subject["foo"] = "bar"
2015-10-20 11:30:38 -05:00
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