summaryrefslogtreecommitdiff
path: root/spec/ruby/library/zlib/gzipfile
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/zlib/gzipfile')
-rw-r--r--spec/ruby/library/zlib/gzipfile/close_spec.rb11
-rw-r--r--spec/ruby/library/zlib/gzipfile/closed_spec.rb7
-rw-r--r--spec/ruby/library/zlib/gzipfile/comment_spec.rb6
-rw-r--r--spec/ruby/library/zlib/gzipfile/crc_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/finish_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/level_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/mtime_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/orig_name_spec.rb6
-rw-r--r--spec/ruby/library/zlib/gzipfile/os_code_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/sync_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/to_io_spec.rb1
-rw-r--r--spec/ruby/library/zlib/gzipfile/wrap_spec.rb1
12 files changed, 11 insertions, 27 deletions
diff --git a/spec/ruby/library/zlib/gzipfile/close_spec.rb b/spec/ruby/library/zlib/gzipfile/close_spec.rb
index 9486d6b9ec..07bafac961 100644
--- a/spec/ruby/library/zlib/gzipfile/close_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/close_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'stringio'
require 'zlib'
@@ -8,15 +8,12 @@ describe "Zlib::GzipFile#close" do
Zlib::GzipWriter.wrap io do |gzio|
gzio.close
- gzio.closed?.should == true
+ gzio.should.closed?
- lambda { gzio.orig_name }.should \
- raise_error(Zlib::GzipFile::Error, 'closed gzip stream')
- lambda { gzio.comment }.should \
- raise_error(Zlib::GzipFile::Error, 'closed gzip stream')
+ -> { gzio.orig_name }.should.raise(Zlib::GzipFile::Error, 'closed gzip stream')
+ -> { gzio.comment }.should.raise(Zlib::GzipFile::Error, 'closed gzip stream')
end
io.string[10..-1].should == ([3] + Array.new(9,0)).pack('C*')
end
end
-
diff --git a/spec/ruby/library/zlib/gzipfile/closed_spec.rb b/spec/ruby/library/zlib/gzipfile/closed_spec.rb
index 69785bc41c..726f391b41 100644
--- a/spec/ruby/library/zlib/gzipfile/closed_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/closed_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'stringio'
require 'zlib'
@@ -6,12 +6,11 @@ describe "Zlib::GzipFile#closed?" do
it "returns the closed status" do
io = StringIO.new
Zlib::GzipWriter.wrap io do |gzio|
- gzio.closed?.should == false
+ gzio.should_not.closed?
gzio.close
- gzio.closed?.should == true
+ gzio.should.closed?
end
end
end
-
diff --git a/spec/ruby/library/zlib/gzipfile/comment_spec.rb b/spec/ruby/library/zlib/gzipfile/comment_spec.rb
index 638e85a4a7..845224df98 100644
--- a/spec/ruby/library/zlib/gzipfile/comment_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/comment_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'stringio'
require 'zlib'
@@ -19,9 +19,7 @@ describe "Zlib::GzipFile#comment" do
Zlib::GzipWriter.wrap @io do |gzio|
gzio.close
- lambda { gzio.comment }.should \
- raise_error(Zlib::GzipFile::Error, 'closed gzip stream')
+ -> { gzio.comment }.should.raise(Zlib::GzipFile::Error, 'closed gzip stream')
end
end
end
-
diff --git a/spec/ruby/library/zlib/gzipfile/crc_spec.rb b/spec/ruby/library/zlib/gzipfile/crc_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/crc_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/finish_spec.rb b/spec/ruby/library/zlib/gzipfile/finish_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/finish_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/level_spec.rb b/spec/ruby/library/zlib/gzipfile/level_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/level_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/mtime_spec.rb b/spec/ruby/library/zlib/gzipfile/mtime_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/mtime_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb b/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb
index 42a3b2f376..1da375390b 100644
--- a/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
+require_relative '../../../spec_helper'
require 'stringio'
require 'zlib'
@@ -19,9 +19,7 @@ describe "Zlib::GzipFile#orig_name" do
Zlib::GzipWriter.wrap @io do |gzio|
gzio.close
- lambda { gzio.orig_name }.should \
- raise_error(Zlib::GzipFile::Error, 'closed gzip stream')
+ -> { gzio.orig_name }.should.raise(Zlib::GzipFile::Error, 'closed gzip stream')
end
end
end
-
diff --git a/spec/ruby/library/zlib/gzipfile/os_code_spec.rb b/spec/ruby/library/zlib/gzipfile/os_code_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/os_code_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/sync_spec.rb b/spec/ruby/library/zlib/gzipfile/sync_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/sync_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/to_io_spec.rb b/spec/ruby/library/zlib/gzipfile/to_io_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/to_io_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)
diff --git a/spec/ruby/library/zlib/gzipfile/wrap_spec.rb b/spec/ruby/library/zlib/gzipfile/wrap_spec.rb
deleted file mode 100644
index 6a4c1dadb4..0000000000
--- a/spec/ruby/library/zlib/gzipfile/wrap_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require File.expand_path('../../../../spec_helper', __FILE__)