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
f1765c07
Commit
f1765c07
authored
Oct 09, 2015
by
Samuel Giddins
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[HooksManager] Add spec for passing along user options with indifferent access
parent
bc390994
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
hooks_manager_spec.rb
spec/unit/hooks_manager_spec.rb
+13
-0
No files found.
spec/unit/hooks_manager_spec.rb
View file @
f1765c07
...
@@ -79,6 +79,19 @@ module Pod
...
@@ -79,6 +79,19 @@ module Pod
end
end
end
end
it
'passes along user-specified options as hashes with indifferent access'
do
run_count
=
0
@hooks_manager
.
register
(
'plugin'
,
:post_install
)
do
|
_options
,
user_options
|
user_options
[
'key'
].
should
==
'value'
user_options
[
:key
].
should
==
'value'
run_count
+=
1
end
@hooks_manager
.
run
(
:post_install
,
Object
.
new
,
'plugin'
=>
{
'key'
=>
'value'
})
@hooks_manager
.
run
(
:post_install
,
Object
.
new
,
'plugin'
=>
{
:key
=>
'value'
})
run_count
.
should
==
2
end
it
'raises if no name is given'
do
it
'raises if no name is given'
do
should
.
raise
ArgumentError
do
should
.
raise
ArgumentError
do
@hooks_manager
.
run
(
nil
,
Object
.
new
)
{}
@hooks_manager
.
run
(
nil
,
Object
.
new
)
{}
...
...
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