summaryrefslogtreecommitdiff
path: root/spec/ruby/core/string/allocate_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/string/allocate_spec.rb')
-rw-r--r--spec/ruby/core/string/allocate_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/ruby/core/string/allocate_spec.rb b/spec/ruby/core/string/allocate_spec.rb
index 9048815c5d..00dadaf076 100644
--- a/spec/ruby/core/string/allocate_spec.rb
+++ b/spec/ruby/core/string/allocate_spec.rb
@@ -1,9 +1,9 @@
-require File.expand_path('../../../spec_helper', __FILE__)
+require_relative '../../spec_helper'
describe "String.allocate" do
it "returns an instance of String" do
str = String.allocate
- str.should be_an_instance_of(String)
+ str.should.instance_of?(String)
end
it "returns a fully-formed String" do
@@ -14,6 +14,6 @@ describe "String.allocate" do
end
it "returns a binary String" do
- String.new.encoding.should == Encoding::BINARY
+ String.allocate.encoding.should == Encoding::BINARY
end
end