module RSpec::Rails::ViewAssigns

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