Module: Logux::Test::Helpers
- Defined in:
- lib/logux/test/helpers.rb
Class Method Summary collapse
Instance Method Summary collapse
- #a_logux_action_with(attributes = {}) ⇒ Object (also: #a_logux_action)
- #a_logux_meta_with(attributes = {}) ⇒ Object (also: #a_logux_meta)
- #logux_approved(meta = nil) ⇒ Object
- #logux_authenticated(meta = nil) ⇒ Object
- #logux_denied(meta = nil) ⇒ Object
- #logux_errored(meta = nil) ⇒ Object
- #logux_forbidden(meta = nil) ⇒ Object
- #logux_processed(meta = nil) ⇒ Object
- #logux_store ⇒ Object
- #logux_unauthorized(meta = nil) ⇒ Object
- #send_to_logux(*commands) ⇒ Object
Class Method Details
Instance Method Details
#a_logux_action_with(attributes = {}) ⇒ Object Also known as: a_logux_action
25 26 27 |
# File 'lib/logux/test/helpers.rb', line 25 def a_logux_action_with(attributes = {}) RSpec::Matchers::BuiltIn::Include.new(attributes.stringify_keys) end |
#a_logux_meta_with(attributes = {}) ⇒ Object Also known as: a_logux_meta
20 21 22 |
# File 'lib/logux/test/helpers.rb', line 20 def (attributes = {}) RSpec::Matchers::BuiltIn::Include.new(attributes.stringify_keys) end |
#logux_approved(meta = nil) ⇒ Object
30 31 32 33 34 |
# File 'lib/logux/test/helpers.rb', line 30 def logux_approved( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['approved'], excludes: %w[forbidden error] ) end |
#logux_authenticated(meta = nil) ⇒ Object
54 55 56 57 58 |
# File 'lib/logux/test/helpers.rb', line 54 def logux_authenticated( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['authenticated'] ) end |
#logux_denied(meta = nil) ⇒ Object
66 67 68 69 70 |
# File 'lib/logux/test/helpers.rb', line 66 def logux_denied( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['denied'] ) end |
#logux_errored(meta = nil) ⇒ Object
48 49 50 51 52 |
# File 'lib/logux/test/helpers.rb', line 48 def logux_errored( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['error'] ) end |
#logux_forbidden(meta = nil) ⇒ Object
42 43 44 45 46 |
# File 'lib/logux/test/helpers.rb', line 42 def logux_forbidden( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['forbidden'] ) end |
#logux_processed(meta = nil) ⇒ Object
36 37 38 39 40 |
# File 'lib/logux/test/helpers.rb', line 36 def logux_processed( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['processed'], excludes: %w[forbidden error] ) end |
#logux_store ⇒ Object
12 13 14 |
# File 'lib/logux/test/helpers.rb', line 12 def logux_store Logux::Test::Store.instance.data end |
#logux_unauthorized(meta = nil) ⇒ Object
60 61 62 63 64 |
# File 'lib/logux/test/helpers.rb', line 60 def ( = nil) Logux::Test::Matchers::ResponseChunks.new( meta: , includes: ['unauthorized'] ) end |
#send_to_logux(*commands) ⇒ Object
16 17 18 |
# File 'lib/logux/test/helpers.rb', line 16 def send_to_logux(*commands) Logux::Test::Matchers::SendToLogux.new(*commands) end |