Module: ViewSpec::TestHelpers

Included in:
TestCase
Defined in:
lib/view_spec/test_helpers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rendered_contentObject (readonly)

Returns the value of attribute rendered_content.



16
17
18
# File 'lib/view_spec/test_helpers.rb', line 16

def rendered_content
  @rendered_content
end

Instance Method Details

#render_preview(preview) ⇒ Object



18
19
20
21
# File 'lib/view_spec/test_helpers.rb', line 18

def render_preview(preview)
  @rendered_content = Nokogiri::HTML.fragment(preview.to_s)
  @rendered_content
end