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.
Headers#include?
#key?
1 parent 1d9452b commit be29fbbCopy full SHA for be29fbb
lib/protocol/http/headers.rb
@@ -157,6 +157,8 @@ def include? key
157
self[key] != nil
158
end
159
160
+ alias key? include?
161
+
162
def keys
163
self.to_h.keys
164
spec/protocol/http/headers_spec.rb
@@ -66,6 +66,18 @@
66
67
68
69
+ describe '#include?' do
70
+ it "should include? named fields" do
71
+ expect(subject).to be_include('set-cookie')
72
+ end
73
74
75
+ describe '#key?' do
76
+ it "should key? named fields" do
77
+ expect(subject).to be_key('set-cookie')
78
79
80
81
describe '#fields' do
82
it 'should add fields in order' do
83
expect(subject.fields).to be == fields
0 commit comments