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
02a52101
Commit
02a52101
authored
Mar 27, 2012
by
Eloy Duran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import Bacon color extension.
parent
69de5e8d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
7 deletions
+55
-7
.kick
.kick
+1
-1
spec_helper.rb
spec/spec_helper.rb
+11
-6
color_output.rb
spec/spec_helper/color_output.rb
+43
-0
No files found.
.kick
View file @
02a52101
...
@@ -6,7 +6,7 @@ process do |files|
...
@@ -6,7 +6,7 @@ process do |files|
specs = files.take_and_map do |file|
specs = files.take_and_map do |file|
case file
case file
when %r{lib/cocoapods/installer.+\.rb$}
when %r{lib/cocoapods/installer.+\.rb$}
'spec/unit/installer_spec.rb'
['spec/unit/installer_spec.rb', 'spec/unit/target_installer_spec.rb']
when %r{lib/cocoapods/(.+?)\.rb$}
when %r{lib/cocoapods/(.+?)\.rb$}
s = Dir.glob("spec/**/#{$1}_spec.rb")
s = Dir.glob("spec/**/#{$1}_spec.rb")
s unless s.empty?
s unless s.empty?
...
...
spec/spec_helper.rb
View file @
02a52101
...
@@ -12,18 +12,23 @@ $:.unshift((ROOT + 'lib').to_s)
...
@@ -12,18 +12,23 @@ $:.unshift((ROOT + 'lib').to_s)
require
'cocoapods'
require
'cocoapods'
$:
.
unshift
((
ROOT
+
'spec'
).
to_s
)
$:
.
unshift
((
ROOT
+
'spec'
).
to_s
)
require
'spec_helper/color_output'
require
'spec_helper/fixture'
require
'spec_helper/fixture'
require
'spec_helper/git'
require
'spec_helper/git'
require
'spec_helper/temporary_directory'
require
'spec_helper/temporary_directory'
context_class
=
defined?
(
BaconContext
)
?
BaconContext
:
Bacon
::
Context
module
Bacon
context_class
.
class_eval
do
extend
ColorOutput
include
Pod
::
Config
::
Mixin
summary_at_exit
include
SpecHelper
::
Fixture
class
Context
include
Pod
::
Config
::
Mixin
def
argv
(
*
argv
)
include
SpecHelper
::
Fixture
Pod
::
Command
::
ARGV
.
new
(
argv
)
def
argv
(
*
argv
)
Pod
::
Command
::
ARGV
.
new
(
argv
)
end
end
end
end
end
...
...
spec/spec_helper/color_output.rb
0 → 100644
View file @
02a52101
# Graciously yanked from https://github.com/zen-cms/Zen-Core
# MIT License
# Thanks, YorickPeterse!
#:nodoc:
module
Bacon
#:nodoc:
module
ColorOutput
#:nodoc:
def
handle_specification
(
name
)
puts
spaces
+
name
yield
puts
if
Counter
[
:context_depth
]
==
1
end
#:nodoc:
def
handle_requirement
(
description
)
error
=
yield
if
!
error
.
empty?
puts
"
#{
spaces
}
\e
[31m-
#{
description
}
[FAILED]
\e
[0m"
else
puts
"
#{
spaces
}
\e
[32m-
#{
description
}
\e
[0m"
end
end
#:nodoc:
def
handle_summary
print
ErrorLog
if
Backtraces
puts
"%d specifications (%d requirements), %d failures, %d errors"
%
Counter
.
values_at
(
:specifications
,
:requirements
,
:failed
,
:errors
)
end
#:nodoc:
def
spaces
if
Counter
[
:context_depth
]
==
0
Counter
[
:context_depth
]
=
1
end
return
' '
*
(
Counter
[
:context_depth
]
-
1
)
end
end
# ColorOutput
end
# Bacon
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