module RSpec::Rails::ViewAssigns

def _encapsulated_assigns

def _encapsulated_assigns
  @_encapsulated_assigns ||= {}
end

def assign(key, value)

assign(:widget, stub_model(Widget))

@example

view being rendered.
Assigns a value to an instance variable in the scope of the
def assign(key, value)
  _encapsulated_assigns[key] = value
end

def view_assigns

Compat-shim for AbstractController::Rendering#view_assigns
def view_assigns
  super.merge(_encapsulated_assigns)
end