Skip to content

Commit

Permalink
Add specs for Zlib::ZStream
Browse files Browse the repository at this point in the history
  • Loading branch information
IPGlider committed Apr 21, 2012
1 parent cedcd49 commit e0fd4d7
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/ruby/library/zlib/zstream/avail_in_spec.rb
@@ -1 +1,9 @@
require File.expand_path('../../../../spec_helper', __FILE__)
require 'zlib'

describe "Zlib::ZStream#avail_in" do
it "returns bytes in the input buffer" do
z = Zlib::Deflate.new
z.avail_in.should == 0
end
end
8 changes: 8 additions & 0 deletions spec/ruby/library/zlib/zstream/avail_out_spec.rb
@@ -1 +1,9 @@
require File.expand_path('../../../../spec_helper', __FILE__)
require 'zlib'

describe "Zlib::ZStream#avail_out" do
it "returns bytes in the output buffer" do
z = Zlib::Deflate.new
z.avail_out.should == 0
end
end
8 changes: 8 additions & 0 deletions spec/ruby/library/zlib/zstream/data_type_spec.rb
@@ -1 +1,9 @@
require File.expand_path('../../../../spec_helper', __FILE__)
require 'zlib'

describe "Zlib::ZStream#data_type" do
it "returns the type of the data in the stream" do
z = Zlib::Deflate.new
[Zlib::ASCII, Zlib::BINARY, Zlib::UNKNOWN].include?(z.data_type).should == true
end
end

0 comments on commit e0fd4d7

Please sign in to comment.