module RSpec::Rails::ViewExampleGroup::ExampleMethods

def _default_render_options

def _default_render_options
  if ::Rails::VERSION::STRING >= '3.2'
    # pluck the handler, format, and locale out of, eg, posts/index.de.html.haml
    template, *components   = _default_file_to_render.split('.')
    handler, format, locale = *components.reverse
    render_options = { :template => template }
    render_options[:handlers] = [handler] if handler
    render_options[:formats] = [format.to_sym] if format
    render_options[:locales] = [locale] if locale
    render_options
  else
    { :template => _default_file_to_render }
  end
end