Sha256: e87d4c268c4b6228038994719bc6084c63a8c831f4d04cf16fc40f74bac254bd

Contents?: true

Size: 1.32 KB

Versions: 7

Compression:

Stored size: 1.32 KB

Contents

require 'spec_helper'

describe "users/index.html.erb" do
  before(:each) do
    assign(:users, [
      stub_model(User,
        :name => "Name",
        :nickname => "Nickname",
        :image => "Image",
        :description => "Description",
        :location => "Location"
      ),
      stub_model(User,
        :name => "Name",
        :nickname => "Nickname",
        :image => "Image",
        :description => "Description",
        :location => "Location"
      )
    ])
  end

  it "renders a list of users" do
    render
    # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Name".to_s, :count => 2
    # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Nickname".to_s, :count => 2
    # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Image".to_s, :count => 2
    # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Description".to_s, :count => 2
    # Run the generator again with the --webrat-matchers flag if you want to use webrat matchers
    assert_select "tr>td", :text => "Location".to_s, :count => 2
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
echo_base-0.1.3 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb
echo_base-0.1.2 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb
echo_base-0.1.1 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb
echo_base-0.1.0 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb
echo_base-0.0.4 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb
echo_base-0.0.3 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb
echo_base-0.0.2 lib/generators/echo_base/templates/spec/views/users/index.html.erb_spec.rb