diff options
Diffstat (limited to 'spec/ruby/library/zlib/gzipreader')
-rw-r--r-- | spec/ruby/library/zlib/gzipreader/each_line_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/gzipreader/each_spec.rb | 1 | ||||
-rw-r--r-- | spec/ruby/library/zlib/gzipreader/mtime_spec.rb | 11 | ||||
-rw-r--r-- | spec/ruby/library/zlib/gzipreader/new_spec.rb | 1 |
4 files changed, 13 insertions, 1 deletions
diff --git a/spec/ruby/library/zlib/gzipreader/each_line_spec.rb b/spec/ruby/library/zlib/gzipreader/each_line_spec.rb index efaf27d6bb..6f17365879 100644 --- a/spec/ruby/library/zlib/gzipreader/each_line_spec.rb +++ b/spec/ruby/library/zlib/gzipreader/each_line_spec.rb @@ -1,3 +1,4 @@ +require_relative "../../../spec_helper" require_relative 'shared/each' describe "Zlib::GzipReader#each_line" do diff --git a/spec/ruby/library/zlib/gzipreader/each_spec.rb b/spec/ruby/library/zlib/gzipreader/each_spec.rb index 59aa63e52c..3b98391a87 100644 --- a/spec/ruby/library/zlib/gzipreader/each_spec.rb +++ b/spec/ruby/library/zlib/gzipreader/each_spec.rb @@ -1,3 +1,4 @@ +require_relative "../../../spec_helper" require_relative 'shared/each' describe "Zlib::GzipReader#each" do diff --git a/spec/ruby/library/zlib/gzipreader/mtime_spec.rb b/spec/ruby/library/zlib/gzipreader/mtime_spec.rb new file mode 100644 index 0000000000..e8e71fa72e --- /dev/null +++ b/spec/ruby/library/zlib/gzipreader/mtime_spec.rb @@ -0,0 +1,11 @@ +require_relative '../../../spec_helper' +require 'zlib' +require 'stringio' + +describe "Zlib::GzipReader#mtime" do + it "returns the timestamp from the Gzip header" do + io = StringIO.new "\x1f\x8b\x08\x00\x44\x33\x22\x11\x00\xff\x03\x00\x00\x00\x00\x00\x00\x00\x00\x00" + gz = Zlib::GzipReader.new(io) + gz.mtime.to_i.should == 0x11223344 + end +end diff --git a/spec/ruby/library/zlib/gzipreader/new_spec.rb b/spec/ruby/library/zlib/gzipreader/new_spec.rb deleted file mode 100644 index e15f14f95f..0000000000 --- a/spec/ruby/library/zlib/gzipreader/new_spec.rb +++ /dev/null @@ -1 +0,0 @@ -require_relative '../../../spec_helper' |