Module: RSpec::Rails::ViewExampleGroup

Extended by:
ActiveSupport::Concern
Includes:
ActionView::TestCase::Behavior, BrowserSimulators, Matchers::RenderTemplate, RailsExampleGroup, ViewAssigns
Defined in:
lib/rspec/rails/example/view_example_group.rb

Overview

Extends ActionView::TestCase::Behavior

Examples

describe "widgets/index.html.erb" do
  it "renders the @widgets" do
    widgets = [
      stub_model(Widget, :name => "Foo"),
      stub_model(Widget, :name => "Bar")
    ]
    assign(:widgets, widgets)
    render
    rendered.should contain("Foo")
    rendered.should contain("Bar")
  end
end

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Method Summary

Methods included from BrowserSimulators

included