Module: Riot
- Defined in:
- lib/riot.rb,
lib/riot/context.rb,
lib/riot/reporter.rb,
lib/riot/runnable.rb,
lib/riot/situation.rb,
lib/riot/assertion_macros.rb
Defined Under Namespace
Classes: Assertion, Context, DotMatrixReporter, IOReporter, Reporter, RunnableBlock, Setup, SilentReporter, Situation, StoryReporter, VerboseReporter
Class Method Summary
collapse
Class Method Details
.context(description, &definition) ⇒ Object
8
9
10
|
# File 'lib/riot.rb', line 8
def self.context(description, &definition)
root_contexts << Context.new(description, &definition)
end
|
.reporter=(reporter_class) ⇒ Object
27
|
# File 'lib/riot.rb', line 27
def self.reporter=(reporter_class) @reporter_class = reporter_class; end
|
.root_contexts ⇒ Object
12
|
# File 'lib/riot.rb', line 12
def self.root_contexts; @root_contexts ||= []; end
|
14
15
16
17
18
19
|
# File 'lib/riot.rb', line 14
def self.run
the_reporter = reporter.new
the_reporter.summarize do
root_contexts.each { |ctx| ctx.run(the_reporter) }
end
end
|
.silently! ⇒ Object
21
|
# File 'lib/riot.rb', line 21
def self.silently!; @silent = true; end
|
.silently? ⇒ Boolean
22
|
# File 'lib/riot.rb', line 22
def self.silently?; @silent == true; end
|
TODO: make this a flag that DotMatrix and Story respect and cause them to print errors/failures