We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f65ce6f commit 32fbe9fCopy full SHA for 32fbe9f
spec/ruby/core/file/shared/path.rb
@@ -15,6 +15,23 @@
15
@file.send(@method).should be_an_instance_of(String)
16
end
17
18
+ it "returns a different String on every call" do
19
+ @file = File.new @path
20
+ path1 = @file.send(@method)
21
+ path2 = @file.send(@method)
22
+ path1.should == path2
23
+ path1.should_not.equal?(path2)
24
+ end
25
+
26
+ it "returns a mutable String" do
27
+ @file = File.new @path.dup.freeze
28
+ path = @file.send(@method)
29
+ path.should == @path
30
+ path.should_not.frozen?
31
+ path << "test"
32
+ @file.send(@method).should == @path
33
34
35
it "calls to_str on argument and returns exact value" do
36
path = mock('path')
37
path.should_receive(:to_str).and_return(@path)
0 commit comments