Class: Luna::RSpec::Formatters::Documentation
- Inherits:
-
RSpec::Core::Formatters::BaseTextFormatter
- Object
- RSpec::Core::Formatters::BaseTextFormatter
- Luna::RSpec::Formatters::Documentation
show all
- Includes:
- Profile
- Defined in:
- lib/luna/rspec/formatters/documentation.rb
Constant Summary
Constants included
from Profile
Profile::EXAMPLES, Profile::EXAMPLES_HEADER, Profile::GROUPS, Profile::GROUPS_HEADER
Instance Method Summary
collapse
Methods included from Profile
#dump_profile, #helpers
Instance Method Details
#example_failed(e) ⇒ Object
40
41
42
43
|
# File 'lib/luna/rspec/formatters/documentation.rb', line 40
def example_failed(e)
output.print("\s")
print_description(e, :failure)
end
|
#example_passed(e) ⇒ Object
35
36
37
38
|
# File 'lib/luna/rspec/formatters/documentation.rb', line 35
def example_passed(e)
output.print("\s")
print_description(e, :success)
end
|
#example_pending(e) ⇒ Object
45
46
47
48
|
# File 'lib/luna/rspec/formatters/documentation.rb', line 45
def example_pending(e)
output.print("\s")
print_description(e, :pending)
end
|
#print_description(example, type) ⇒ Object
50
51
52
53
|
# File 'lib/luna/rspec/formatters/documentation.rb', line 50
def print_description(example, type)
output.print send(:"#{type}_color",
"\t" + example.full_description + "\n")
end
|
#start(*args) ⇒ Object
25
26
27
28
|
# File 'lib/luna/rspec/formatters/documentation.rb', line 25
def start(*args)
super(*args) if defined?(super)
output.puts
end
|
#start_dump(*args) ⇒ Object
30
31
32
33
|
# File 'lib/luna/rspec/formatters/documentation.rb', line 30
def start_dump(*args)
super(*args) if defined?(super)
output.puts
end
|