File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ def renamed?
48
48
ensure_leading_slash ( request_payload [ "path" ] ) != relative_path
49
49
end
50
50
51
+ private
52
+
51
53
# Returns the path to the requested file's containing directory
52
54
def directory_path
53
55
case namespace
@@ -60,8 +62,6 @@ def directory_path
60
62
end
61
63
end
62
64
63
- private
64
-
65
65
def ensure_leading_slash ( input )
66
66
return input if input . nil? || input . empty? || input . start_with? ( "/" )
67
67
"/#{ input } "
Original file line number Diff line number Diff line change @@ -80,14 +80,14 @@ def collection
80
80
end
81
81
82
82
it "knows the directory path" do
83
- expect ( subject . directory_path ) . to eql ( "#{ site_source } /" )
83
+ expect ( subject . send ( : directory_path) ) . to eql ( "#{ site_source } /" )
84
84
end
85
85
86
86
context "subdir" do
87
87
let ( :splat ) { [ "foo" ] }
88
88
89
89
it "knows the directory path" do
90
- expect ( subject . directory_path ) . to eql ( "#{ site_source } /foo" )
90
+ expect ( subject . send ( : directory_path) ) . to eql ( "#{ site_source } /foo" )
91
91
end
92
92
93
93
it "returns the path" do
@@ -107,7 +107,7 @@ def collection
107
107
let ( :namespace ) { "collections" }
108
108
109
109
it "knows the directory path" do
110
- expect ( subject . directory_path ) . to eql ( "#{ site_source } /_puppies" )
110
+ expect ( subject . send ( : directory_path) ) . to eql ( "#{ site_source } /_puppies" )
111
111
end
112
112
113
113
it "returns the path" do
You can’t perform that action at this time.
0 commit comments