summaryrefslogtreecommitdiff
path: root/spec/ruby/core/kernel/backtick_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/core/kernel/backtick_spec.rb')
-rw-r--r--spec/ruby/core/kernel/backtick_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/ruby/core/kernel/backtick_spec.rb b/spec/ruby/core/kernel/backtick_spec.rb
index 834d5636c1..42e0f975f5 100644
--- a/spec/ruby/core/kernel/backtick_spec.rb
+++ b/spec/ruby/core/kernel/backtick_spec.rb
@@ -11,7 +11,7 @@ describe "Kernel#`" do
end
it "is a private method" do
- Kernel.should have_private_instance_method(:`)
+ Kernel.private_instance_methods(false).should.include?(:`)
end
it "returns the standard output of the executed sub-process" do
@@ -28,11 +28,11 @@ describe "Kernel#`" do
it "produces a String in the default external encoding" do
Encoding.default_external = Encoding::SHIFT_JIS
- `echo disc`.encoding.should equal(Encoding::SHIFT_JIS)
+ `echo disc`.encoding.should.equal?(Encoding::SHIFT_JIS)
end
it "raises an Errno::ENOENT if the command is not executable" do
- -> { `nonexistent_command` }.should raise_error(Errno::ENOENT)
+ -> { `nonexistent_command` }.should.raise(Errno::ENOENT)
end
platform_is_not :windows do
@@ -43,13 +43,13 @@ describe "Kernel#`" do
it "sets $? to the exit status of the executed sub-process" do
ip = 'world'
`echo disc #{ip}`
- $?.should be_kind_of(Process::Status)
+ $?.should.is_a?(Process::Status)
$?.should_not.stopped?
$?.should.exited?
$?.exitstatus.should == 0
$?.should.success?
`echo disc #{ip}; exit 99`
- $?.should be_kind_of(Process::Status)
+ $?.should.is_a?(Process::Status)
$?.should_not.stopped?
$?.should.exited?
$?.exitstatus.should == 99
@@ -61,13 +61,13 @@ describe "Kernel#`" do
it "sets $? to the exit status of the executed sub-process" do
ip = 'world'
`echo disc #{ip}`
- $?.should be_kind_of(Process::Status)
+ $?.should.is_a?(Process::Status)
$?.should_not.stopped?
$?.should.exited?
$?.exitstatus.should == 0
$?.should.success?
`echo disc #{ip}& exit 99`
- $?.should be_kind_of(Process::Status)
+ $?.should.is_a?(Process::Status)
$?.should_not.stopped?
$?.should.exited?
$?.exitstatus.should == 99