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.rb8
-rw-r--r--spec/ruby/library/zlib/gzipfile/closed_spec.rb4
-rw-r--r--spec/ruby/library/zlib/gzipfile/comment_spec.rb3
-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.rb3
-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, 7 insertions, 19 deletions
diff --git a/spec/ruby/library/zlib/gzipfile/close_spec.rb b/spec/ruby/library/zlib/gzipfile/close_spec.rb
index 27eb34cdd9..07bafac961 100644
--- a/spec/ruby/library/zlib/gzipfile/close_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/close_spec.rb
@@ -8,12 +8,10 @@ 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*')
diff --git a/spec/ruby/library/zlib/gzipfile/closed_spec.rb b/spec/ruby/library/zlib/gzipfile/closed_spec.rb
index b885add485..726f391b41 100644
--- a/spec/ruby/library/zlib/gzipfile/closed_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/closed_spec.rb
@@ -6,11 +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 7493f74f1c..845224df98 100644
--- a/spec/ruby/library/zlib/gzipfile/comment_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/comment_spec.rb
@@ -19,8 +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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/crc_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/finish_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/level_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/mtime_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
diff --git a/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb b/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb
index cae5305355..1da375390b 100644
--- a/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb
+++ b/spec/ruby/library/zlib/gzipfile/orig_name_spec.rb
@@ -19,8 +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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/os_code_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/sync_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/to_io_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'
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 e15f14f95f..0000000000
--- a/spec/ruby/library/zlib/gzipfile/wrap_spec.rb
+++ /dev/null
@@ -1 +0,0 @@
-require_relative '../../../spec_helper'