summaryrefslogtreecommitdiff
path: root/spec/rubyspec/library/net/http/httpheader/shared/size.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/rubyspec/library/net/http/httpheader/shared/size.rb')
-rw-r--r--spec/rubyspec/library/net/http/httpheader/shared/size.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/rubyspec/library/net/http/httpheader/shared/size.rb b/spec/rubyspec/library/net/http/httpheader/shared/size.rb
new file mode 100644
index 0000000000..e2b1e4c22b
--- /dev/null
+++ b/spec/rubyspec/library/net/http/httpheader/shared/size.rb
@@ -0,0 +1,18 @@
+describe :net_httpheader_size, shared: true do
+ before :each do
+ @headers = NetHTTPHeaderSpecs::Example.new
+ end
+
+ it "returns the number of header entries in self" do
+ @headers.send(@method).should eql(0)
+
+ @headers["a"] = "b"
+ @headers.send(@method).should eql(1)
+
+ @headers["b"] = "b"
+ @headers.send(@method).should eql(2)
+
+ @headers["c"] = "c"
+ @headers.send(@method).should eql(3)
+ end
+end