summaryrefslogtreecommitdiff
path: root/spec/ruby/core/file/join_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/file/join_spec.rb')
-rw-r--r--spec/ruby/core/file/join_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/file/join_spec.rb b/spec/ruby/core/file/join_spec.rb
index 0feedbae93..0f0911ea31 100644
--- a/spec/ruby/core/file/join_spec.rb
+++ b/spec/ruby/core/file/join_spec.rb
@@ -52,7 +52,7 @@ describe "File.join" do
it "returns a duplicate string when given a single argument" do
str = "usr"
File.join(str).should == str
- File.join(str).should_not equal(str)
+ File.join(str).should_not.equal?(str)
end
it "supports any number of arguments" do
@@ -104,15 +104,15 @@ describe "File.join" do
it "raises an ArgumentError if passed a recursive array" do
a = ["a"]
a << a
- -> { File.join a }.should raise_error(ArgumentError)
+ -> { File.join a }.should.raise(ArgumentError)
end
it "raises a TypeError exception when args are nil" do
- -> { File.join nil }.should raise_error(TypeError)
+ -> { File.join nil }.should.raise(TypeError)
end
it "calls #to_str" do
- -> { File.join(mock('x')) }.should raise_error(TypeError)
+ -> { File.join(mock('x')) }.should.raise(TypeError)
bin = mock("bin")
bin.should_receive(:to_str).exactly(:twice).and_return("bin")
@@ -129,7 +129,7 @@ describe "File.join" do
end
it "calls #to_path" do
- -> { File.join(mock('x')) }.should raise_error(TypeError)
+ -> { File.join(mock('x')) }.should.raise(TypeError)
bin = mock("bin")
bin.should_receive(:to_path).exactly(:twice).and_return("bin")
@@ -138,10 +138,10 @@ describe "File.join" do
end
it "raises errors for null bytes" do
- -> { File.join("\x00x", "metadata.gz") }.should raise_error(ArgumentError) { |e|
+ -> { File.join("\x00x", "metadata.gz") }.should.raise(ArgumentError) { |e|
e.message.should == 'string contains null byte'
}
- -> { File.join("metadata.gz", "\x00x") }.should raise_error(ArgumentError) { |e|
+ -> { File.join("metadata.gz", "\x00x") }.should.raise(ArgumentError) { |e|
e.message.should == 'string contains null byte'
}
end