diff options
author | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 10:48:09 +0000 |
---|---|---|
committer | eregon <eregon@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-27 10:48:09 +0000 |
commit | ecc707e233a5577ea2048b3199d4baaf96c6b0f8 (patch) | |
tree | 34601f7bdd7440b654494f557a0c22675d75afac /spec/mspec | |
parent | 970410c63cfbd349a910cacf826f5671d61da68a (diff) | |
download | ruby-ecc707e233a5577ea2048b3199d4baaf96c6b0f8.tar.gz |
Update to ruby/mspec@4729971
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'spec/mspec')
-rw-r--r-- | spec/mspec/spec/utils/script_spec.rb | 10 |
1 files 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"] |