Class: Remarkable::Controller::Matchers::RenderWithLayout
- Inherits:
-
Matcher::Base
- Object
- Matcher::Base
- Remarkable::Controller::Matchers::RenderWithLayout
show all
- Defined in:
- lib/remarkable/controller/macros/render_with_layout_matcher.rb
Instance Method Summary
collapse
#negative, #negative_failure_message, #spec
included
Constructor Details
#initialize(expected_layout = 'application') ⇒ RenderWithLayout
Returns a new instance of RenderWithLayout.
5
6
7
|
# File 'lib/remarkable/controller/macros/render_with_layout_matcher.rb', line 5
def initialize(expected_layout = 'application')
@expected_layout = expected_layout
end
|
Instance Method Details
#description ⇒ Object
23
24
25
|
# File 'lib/remarkable/controller/macros/render_with_layout_matcher.rb', line 23
def description
expectation
end
|
#failure_message ⇒ Object
27
28
29
|
# File 'lib/remarkable/controller/macros/render_with_layout_matcher.rb', line 27
def failure_message
@missing
end
|
#matches?(subject) ⇒ Boolean
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/remarkable/controller/macros/render_with_layout_matcher.rb', line 9
def matches?(subject)
@subject = subject
initialize_with_spec!
assert_matcher do
if @expected_layout
with_layout?
else
without_layout?
end
end
end
|