Sha256: cbf7c8eabe03bae7ceca834c599d528f5ef06ab1dabcd5ceff759a9edf239d32

Contents?: true

Size: 438 Bytes

Versions: 25

Compression:

Stored size: 438 Bytes

Contents

require 'rails_helper'

class MockComponentClass < ActiveAdmin::Component; end

describe ActiveAdmin::Component do

  let(:component_class){ MockComponentClass }
  let(:component){ component_class.new }

  it "should be a subclass of an html div" do
    expect(ActiveAdmin::Component.ancestors).to include(Arbre::HTML::Div)
  end

  it "should render to a div, even as a subclass" do
    expect(component.tag_name).to eq 'div'
  end

end

Version data entries

25 entries across 25 versions & 4 rubygems

Version Path
activeadmin-1.0.0.pre2 spec/unit/component_spec.rb
activeadmin-1.0.0.pre1 spec/unit/component_spec.rb
yousty-activeadmin-1.0.7.pre spec/unit/component_spec.rb
yousty-activeadmin-1.0.6.pre spec/unit/component_spec.rb
yousty-activeadmin-1.0.5.pre spec/unit/component_spec.rb