From ecc707e233a5577ea2048b3199d4baaf96c6b0f8 Mon Sep 17 00:00:00 2001 From: eregon Date: Sat, 27 Oct 2018 10:48:09 +0000 Subject: Update to ruby/mspec@4729971 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- spec/mspec/spec/utils/script_spec.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/spec/mspec/spec/utils/script_spec.rb b/spec/mspec/spec/utils/script_spec.rb index 2582809fae..e3188ab5ff 100644 --- a/spec/mspec/spec/utils/script_spec.rb +++ b/spec/mspec/spec/utils/script_spec.rb @@ -350,20 +350,20 @@ describe MSpecScript, "#entries" do before :each do @script = MSpecScript.new - File.stub(:expand_path).and_return("name") + File.stub(:realpath).and_return("name") File.stub(:file?).and_return(false) File.stub(:directory?).and_return(false) end it "returns the pattern in an array if it is a file" do - File.should_receive(:expand_path).with("file").and_return("file/expanded.rb") + File.should_receive(:realpath).with("file").and_return("file/expanded.rb") File.should_receive(:file?).with("file/expanded.rb").and_return(true) @script.entries("file").should == ["file/expanded.rb"] end it "returns Dir['pattern/**/*_spec.rb'] if pattern is a directory" do File.should_receive(:directory?).with("name").and_return(true) - File.stub(:expand_path).and_return("name","name/**/*_spec.rb") + File.stub(:realpath).and_return("name", "name/**/*_spec.rb") Dir.should_receive(:[]).with("name/**/*_spec.rb").and_return(["dir1", "dir2"]) @script.entries("name").should == ["dir1", "dir2"] end @@ -382,13 +382,13 @@ describe MSpecScript, "#entries" do it "returns the pattern in an array if it is a file" do name = "#{@name}.rb" - File.should_receive(:expand_path).with(name).and_return(name) + File.should_receive(:realpath).with(name).and_return(name) File.should_receive(:file?).with(name).and_return(true) @script.entries("name.rb").should == [name] end it "returns Dir['pattern/**/*_spec.rb'] if pattern is a directory" do - File.stub(:expand_path).and_return(@name, @name+"/**/*_spec.rb") + File.stub(:realpath).and_return(@name, @name+"/**/*_spec.rb") File.should_receive(:directory?).with(@name).and_return(true) Dir.should_receive(:[]).with(@name + "/**/*_spec.rb").and_return(["dir1", "dir2"]) @script.entries("name").should == ["dir1", "dir2"] -- cgit v1.2.3