Class: RSpectacles::Formatter::Redis
- Inherits:
-
Object
- Object
- RSpectacles::Formatter::Redis
- Defined in:
- lib/rspectacles/formatter/redis.rb
Instance Method Summary collapse
- #example_failed(notification) ⇒ Object
- #example_passed(notification) ⇒ Object
- #example_pending(notification) ⇒ Object
-
#initialize(_) ⇒ Redis
constructor
A new instance of Redis.
- #logger ⇒ Object
- #message(notification) ⇒ Object
- #start(_) ⇒ Object
- #stop(_) ⇒ Object
Constructor Details
#initialize(_) ⇒ Redis
Returns a new instance of Redis.
13 14 |
# File 'lib/rspectacles/formatter/redis.rb', line 13 def initialize(_) end |
Instance Method Details
#example_failed(notification) ⇒ Object
41 42 43 |
# File 'lib/rspectacles/formatter/redis.rb', line 41 def example_failed(notification) logger.log_formatted notification.example end |
#example_passed(notification) ⇒ Object
33 34 35 |
# File 'lib/rspectacles/formatter/redis.rb', line 33 def example_passed(notification) logger.log_formatted notification.example end |
#example_pending(notification) ⇒ Object
37 38 39 |
# File 'lib/rspectacles/formatter/redis.rb', line 37 def example_pending(notification) logger.log_formatted notification.example end |
#logger ⇒ Object
16 17 18 |
# File 'lib/rspectacles/formatter/redis.rb', line 16 def logger @logger ||= RSpectacles::Adapter::RedisLogger.new end |
#message(notification) ⇒ Object
20 21 22 |
# File 'lib/rspectacles/formatter/redis.rb', line 20 def (notification) logger.log "message:#{notification.}" end |
#start(_) ⇒ Object
24 25 26 27 |
# File 'lib/rspectacles/formatter/redis.rb', line 24 def start(_) logger.log 'status:start' logger.delete_last_log end |
#stop(_) ⇒ Object
29 30 31 |
# File 'lib/rspectacles/formatter/redis.rb', line 29 def stop(_) logger.log 'status:stop' end |