This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commit f0ce915
1 parent ed08d80 commit f0ce915 Copy full SHA for f0ce915
File tree 2 files changed +10
-0
lines changed
lib/cocoapods-core/specification
2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -178,6 +178,11 @@ def validate_name
178
178
'name of the file.' )
179
179
end
180
180
181
+ if spec . name =~ /\/ /
182
+ results . add_error ( 'name' , 'The name of a spec should not contain ' \
183
+ 'a slash.' )
184
+ end
185
+
181
186
if spec . root . name =~ /\s /
182
187
results . add_error ( 'name' , 'The name of a spec should not contain ' \
183
188
'whitespace.' )
Original file line number Diff line number Diff line change @@ -150,6 +150,11 @@ def result_should_include(*values)
150
150
result_should_include ( 'name' , 'whitespace' )
151
151
end
152
152
153
+ it 'fails a specification whose name contains a slash' do
154
+ @spec . stubs ( :name ) . returns ( 'BananaKit/BananaFruit' )
155
+ result_should_include ( 'name' , 'slash' )
156
+ end
157
+
153
158
#------------------#
154
159
155
160
it 'fails a specification whose authors are the default' do
You can’t perform that action at this time.
0 commit comments