Sha256: 509613caed0490519f4867bc4af3179a486c5ac6da07b62bd16d68135904db0d

Contents?: true

Size: 1.44 KB

Versions: 1

Compression:

Stored size: 1.44 KB

Contents

require 'spec_helper'

describe "selections/index" do
  before(:each) do
    assign(:selections, [
      stub_model(Selection,
        :name => "Name",
        :parent_id => 1,
        :system_code => "System Code",
        :position => 1,
        :is_default => false,
        :is_system => false
      ),
      stub_model(Selection,
        :name => "Name",
        :parent_id => 1,
        :system_code => "System Code",
        :position => 1,
        :is_default => false,
        :is_system => false
      )
    ])
  end

  it "renders a list of selections" do
    render
    # Run the generator again with the --webrat 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 flag if you want to use webrat matchers
    assert_select "tr>td", :text => 1.to_s, :count => 2
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => "System Code".to_s, :count => 2
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => 1.to_s, :count => 2
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => false.to_s, :count => 2
    # Run the generator again with the --webrat flag if you want to use webrat matchers
    assert_select "tr>td", :text => false.to_s, :count => 2
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
selections-0.0.1 spec/views/selections/selections/index.html.erb_spec.rb