Class: RSpec::LiveControllers::Matchers::HaveChunk

Inherits:
Base
  • Object
show all
Defined in:
lib/rspec/live_controllers/matchers/have_chunk.rb

Instance Attribute Summary

Attributes inherited from Base

#actual_matcher, #list_of_matchers, #response_body, #target_response

Instance Method Summary collapse

Methods inherited from Base

#initialize, #matches?

Constructor Details

This class inherits a constructor from RSpec::LiveControllers::Matchers::Base

Instance Method Details

#failure_messageObject



9
10
11
# File 'lib/rspec/live_controllers/matchers/have_chunk.rb', line 9

def failure_message
  "Expect «#{response_body}» to have chunk: «#{list_of_matchers.join(' or ')}»."
end

#failure_message_when_negatedObject



13
14
15
# File 'lib/rspec/live_controllers/matchers/have_chunk.rb', line 13

def failure_message_when_negated
  "Expect «#{response_body}» not to have chunk: «#{list_of_matchers.join(' or ')}»."
end

#regexp(reg) ⇒ Object



5
6
7
# File 'lib/rspec/live_controllers/matchers/have_chunk.rb', line 5

def regexp(reg)
  /#{reg}/
end