Class: RSpec::SSE::Matchers::BeGracefullyClosed
- Inherits:
-
Object
- Object
- RSpec::SSE::Matchers::BeGracefullyClosed
- Defined in:
- lib/rspec/sse/matchers.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
- #failure_message_when_negated ⇒ Object
-
#matches?(actual) ⇒ Boolean
Match if the response body ends with “nn”(SSE graceful close).
Instance Method Details
#description ⇒ Object
299 300 301 |
# File 'lib/rspec/sse/matchers.rb', line 299 def description "be gracefully closed" end |
#failure_message ⇒ Object
289 290 291 |
# File 'lib/rspec/sse/matchers.rb', line 289 def 'Expected response body to end with "\\n\\n" (SSE graceful close)' end |
#failure_message_when_negated ⇒ Object
294 295 296 |
# File 'lib/rspec/sse/matchers.rb', line 294 def 'Expected response body not to end with "\\n\\n" (SSE graceful close)' end |
#matches?(actual) ⇒ Boolean
Match if the response body ends with “nn”(SSE graceful close)
283 284 285 286 |
# File 'lib/rspec/sse/matchers.rb', line 283 def matches?(actual) @actual = actual @actual.body.end_with?("\n\n") end |