Sha256: 105a0a918017fa0ecf9c7b7ed696992820deb57f573bdcc1f0ee166d28950303

Contents?: true

Size: 468 Bytes

Versions: 4

Compression:

Stored size: 468 Bytes

Contents

require 'spec_helper'

describe 'Action View Extension' do
  let(:action_view) { ActionView::Base.new }
  let(:objects) do
    3.times.map { FactoryGirl.build(:dummy_model) }
  end

  it 'includes to actionview' do
    action_view.should respond_to :simple_table_for
  end

  it '.simple_table_for renders a table' do
    table = action_view.simple_table_for(objects) do |table|
      table.column :name, :email
    end

    expect(table).to have_tag "table"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
table_cloth-0.4.3 spec/lib/action_view_extension_spec.rb
table_cloth-0.4.2 spec/lib/action_view_extension_spec.rb
table_cloth-0.4.1 spec/lib/action_view_extension_spec.rb
table_cloth-0.4.0 spec/lib/action_view_extension_spec.rb