Module: Bacon
Defined Under Namespace
Modules: KnockOutput, SpecDoxOutput, TapOutput, TestUnitOutput
Classes: Context, Error, Specification
Constant Summary
collapse
- VERSION =
"1.1"
- Counter =
Hash.new(0)
- ErrorLog =
""
- Shared =
Hash.new { |_, name|
raise NameError, "no such context: #{name.inspect}"
}
- RestrictName =
//
- RestrictContext =
//
- Backtraces =
true
Class Method Summary
collapse
handle_requirement_begin, handle_requirement_end, handle_specification_begin, handle_specification_end, handle_summary, spaces
Class Method Details
.add_context(context) ⇒ Object
216
217
218
|
# File 'lib/mac_bacon.rb', line 216
def self.add_context(context)
(@contexts ||= []) << context
end
|
.context_did_finish(context) ⇒ Object
236
237
238
239
240
241
242
243
244
245
246
247
|
# File 'lib/mac_bacon.rb', line 236
def self.context_did_finish(context)
handle_specification_end
Counter[:context_depth] -= 1
if (@current_context_index + 1) < @contexts.size
@current_context_index += 1
run
else
handle_summary
NSApplication.sharedApplication.terminate(self)
end
end
|
.current_context ⇒ Object
224
225
226
|
# File 'lib/mac_bacon.rb', line 224
def self.current_context
@contexts[current_context_index]
end
|
.current_context_index ⇒ Object
220
221
222
|
# File 'lib/mac_bacon.rb', line 220
def self.current_context_index
@current_context_index ||= 0
end
|
228
229
230
231
232
233
234
|
# File 'lib/mac_bacon.rb', line 228
def self.run
@timer ||= Time.now
Counter[:context_depth] += 1
handle_specification_begin(current_context.name)
current_context.performSelector("run", withObject:nil, afterDelay:0)
NSApplication.sharedApplication.run
end
|