HEX
Server: Apache
System: Linux s198.coreserver.jp 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: nagasaki (10062)
PHP: 7.1.33
Disabled: NONE
Upload Files
File: //usr/local/rvm/src/ruby-2.5.9/spec/mspec/spec/helpers/mock_to_path_spec.rb
require 'spec_helper'
require 'mspec/guards'
require 'mspec/helpers'

describe Object, "#mock_to_path" do
  it "returns an object that responds to #to_path" do
    obj = mock_to_path("foo")
    obj.should be_a(MockObject)
    obj.should respond_to(:to_path)
    obj.to_path
  end

  it "returns the provided path when #to_path is called" do
    obj = mock_to_path("/tmp/foo")
    obj.to_path.should == "/tmp/foo"
  end
end