module RSpec::Rails::ViewExampleGroup::ExampleMethods

def stub_template(hash)

stub_template("widgets/_widget.html.erb" => "This content.")

that is the subject of the example.
help isolate view examples from partials rendered by the view template
Rails' FixtureResolver to the front of the view_paths list. Designed to
Simulates the presence of a template on the file system by adding a
def stub_template(hash)
  view.view_paths.unshift(StubResolverCache.resolver_for(hash))
end