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
5a63ce37
Commit
5a63ce37
authored
Jan 26, 2013
by
Fabio Pelosin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Bacon] Add support for 'fit' - focused specs.
parent
34efc528
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
1 deletion
+32
-1
bacon.rb
spec/spec_helper/bacon.rb
+32
-1
No files found.
spec/spec_helper/bacon.rb
View file @
5a63ce37
...
@@ -157,9 +157,40 @@ module Bacon
...
@@ -157,9 +157,40 @@ module Bacon
extend
FilterBacktraces
extend
FilterBacktraces
class
Context
class
Context
def
xit
(
description
,
*
args
)
# Add support for disabled specs
#
def
xit
(
description
,
&
block
)
Counter
[
:disabled
]
+=
1
Counter
[
:disabled
]
+=
1
Bacon
.
handle_requirement
(
description
,
true
)
{[]}
Bacon
.
handle_requirement
(
description
,
true
)
{[]}
end
end
# Add support for running only focused specs
#
# @note The implementation is a hack because bacon evaluates Context#it
# immediately. Therefore this method is intended to be **temporary**.
#
# @example
#
# module BaconFocusedMode; end
#
# describe "A Context" do
# it "will *not* runt" do; end
# fit "will runt" do; end
# end
#
#
def
fit
(
description
,
&
block
)
origina_it
(
description
,
&
block
)
end
# Add support for focused specs
#
alias
:origina_it
:it
def
it
(
description
,
&
block
)
unless
defined?
(
::
BaconFocusedMode
)
origina_it
(
description
,
&
block
)
end
end
end
end
end
end
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