[前][次][番号順一覧][スレッド一覧]

ruby-changes:53173

From: eregon <ko1@a...>
Date: Sat, 27 Oct 2018 19:48:14 +0900 (JST)
Subject: [ruby-changes:53173] eregon:r65387 (trunk): Update to ruby/mspec@4729971

eregon	2018-10-27 19:48:09 +0900 (Sat, 27 Oct 2018)

  New Revision: 65387

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=65387

  Log:
    Update to ruby/mspec@4729971

  Modified files:
    trunk/spec/mspec/spec/utils/script_spec.rb
Index: spec/mspec/spec/utils/script_spec.rb
===================================================================
--- spec/mspec/spec/utils/script_spec.rb	(revision 65386)
+++ spec/mspec/spec/utils/script_spec.rb	(revision 65387)
@@ -350,20 +350,20 @@ describe MSpecScript, "#entries" do https://github.com/ruby/ruby/blob/trunk/spec/mspec/spec/utils/script_spec.rb#L350
   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 https://github.com/ruby/ruby/blob/trunk/spec/mspec/spec/utils/script_spec.rb#L382
 
     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"]

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]