Sha256: 78e5d01974666f4d2c9f312f5b7403bbca92efc77d38288d1ee9cb24d9f34b87

Contents?: true

Size: 718 Bytes

Versions: 3

Compression:

Stored size: 718 Bytes

Contents

require 'spec_helper' 

describe ActiveAdmin::ActionItems do

  describe "rendering" do
    include Arbre::HTML
    let(:assigns){ {} }
    let(:action_item) do
      ActiveAdmin::ActionItems::ActionItem.new do
        h2 "Hello World"
      end
    end

    let(:rendered){ insert_tag ActiveAdmin::Views::ActionItems, [action_item]}

    it "should have a parent .action_items div" do
      rendered.tag_name.should == 'div'
      rendered.class_list.should include('action_items')
    end

    it "should render the contents of each action item" do
      rendered.children.size.should == 1
      rendered.content.strip.should == "<span class=\"action_item\">\n    <h2>Hello World</h2>\n  </span>"
    end
  end

end

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
saulolso-activeadmin-0.2.2.1 spec/unit/action_items_spec.rb
saulolso-activeadmin-0.2.2 spec/unit/action_items_spec.rb
activeadmin-0.2.2 spec/unit/action_items_spec.rb