Module: PostDeploy::Testing
- Defined in:
- lib/postdeploy/testing.rb
Overview
In-memory recorder for host tests. Start with config.test_mode = true.
PostDeploy.configure { |c| c.test_mode = true }
PostDeploy.capture_exception(error)
PostDeploy.flush
item = PostDeploy::Testing.events.first
Class Method Summary collapse
Class Method Details
.events ⇒ Object
11 12 13 |
# File 'lib/postdeploy/testing.rb', line 11 def self.events Array(transport&.envelopes).flat_map { |envelope| envelope[:items] || [] } end |
.reset! ⇒ Object
19 20 21 |
# File 'lib/postdeploy/testing.rb', line 19 def self.reset! PostDeploy.reset! end |
.sessions ⇒ Object
15 16 17 |
# File 'lib/postdeploy/testing.rb', line 15 def self.sessions Array(transport&.session_envelopes).flat_map { |envelope| envelope[:items] || [] } end |