Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
C
cocoapods
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gengmeiios
cocoapods
Commits
06f4bbc6
Unverified
Commit
06f4bbc6
authored
Sep 08, 2016
by
Danielle Tomlinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Validator] Improve spec performance
parent
97c36e55
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
3 deletions
+15
-3
validator_spec.rb
spec/unit/validator_spec.rb
+15
-3
No files found.
spec/unit/validator_spec.rb
View file @
06f4bbc6
...
@@ -135,11 +135,23 @@ module Pod
...
@@ -135,11 +135,23 @@ module Pod
@validator
.
stubs
(
:add_app_project_import
)
@validator
.
stubs
(
:add_app_project_import
)
@validator
.
stubs
(
:build_pod
)
@validator
.
stubs
(
:build_pod
)
@validator
.
stubs
(
:tear_down_validation_environment
)
@validator
.
stubs
(
:tear_down_validation_environment
)
@validator
.
stubs
(
:perform_linting
)
@validator
.
stubs
(
:validate_homepage
)
@validator
.
stubs
(
:validate_screenshots
)
@validator
.
stubs
(
:validate_social_media_url
)
@validator
.
stubs
(
:validate_documentation_url
)
@validator
.
stubs
(
:perform_extensive_subspec_analysis
)
Specification
.
any_instance
.
stubs
(
:available_platforms
).
returns
([])
WebMock
::
API
.
stub_request
(
:head
,
/not-found/
).
to_return
(
:status
=>
404
)
WebMock
::
API
.
stub_request
(
:head
,
/not-found/
).
to_return
(
:status
=>
404
)
WebMock
::
API
.
stub_request
(
:get
,
/not-found/
).
to_return
(
:status
=>
404
)
WebMock
::
API
.
stub_request
(
:get
,
/not-found/
).
to_return
(
:status
=>
404
)
end
end
describe
'Homepage validation'
do
describe
'Homepage validation'
do
before
do
@validator
.
unstub
(
:validate_homepage
)
end
it
'checks if the homepage is valid'
do
it
'checks if the homepage is valid'
do
Specification
.
any_instance
.
stubs
(
:homepage
).
returns
(
'http://banana-corp.local/not-found/'
)
Specification
.
any_instance
.
stubs
(
:homepage
).
returns
(
'http://banana-corp.local/not-found/'
)
@validator
.
validate
@validator
.
validate
...
@@ -203,7 +215,7 @@ module Pod
...
@@ -203,7 +215,7 @@ module Pod
describe
'Screenshot validation'
do
describe
'Screenshot validation'
do
before
do
before
do
@validator
.
stubs
(
:validate_homepage
)
@validator
.
unstub
(
:validate_screenshots
)
WebMock
::
API
.
WebMock
::
API
.
stub_request
(
:head
,
'banana-corp.local/valid-image.png'
).
stub_request
(
:head
,
'banana-corp.local/valid-image.png'
).
to_return
(
to_return
(
...
@@ -229,7 +241,7 @@ module Pod
...
@@ -229,7 +241,7 @@ module Pod
describe
'social media URL validation'
do
describe
'social media URL validation'
do
before
do
before
do
@validator
.
stubs
(
:validate_homepage
)
@validator
.
unstub
(
:validate_social_media_url
)
end
end
it
'checks if the social media URL is valid'
do
it
'checks if the social media URL is valid'
do
...
@@ -249,7 +261,7 @@ module Pod
...
@@ -249,7 +261,7 @@ module Pod
describe
'documentation URL validation'
do
describe
'documentation URL validation'
do
before
do
before
do
@validator
.
stubs
(
:validate_homepage
)
@validator
.
unstub
(
:validate_documentation_url
)
end
end
it
'checks if the documentation URL is valid'
do
it
'checks if the documentation URL is valid'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment