Module: ShouldaRenderJsonTestIntegration

Defined in:
lib/shoulda_render_json_test_integration.rb

Instance Method Summary collapse

Instance Method Details

#render_json(key, options = {}) ⇒ Object



2
3
4
5
6
7
8
9
# File 'lib/shoulda_render_json_test_integration.rb', line 2

def render_json(key, options = {})
  klass = if options[:type] == Array
    ShouldaRenderJsonArrayMatcher
  else
    ShouldaRenderJsonObjectMatcher
  end
  klass.new key, options
end