blob: 464e7e5440a4f56eaae31c6dfc60651cb2577ca2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
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
|