Sha256: 244f2727c3da30dda98de2cb7cef2ff557f670640df44aae54c9309f63704876

Contents?: true

Size: 444 Bytes

Versions: 19

Compression:

Stored size: 444 Bytes

Contents

require 'rails_helper'

class MockComponentClass < ActiveAdmin::Component; end

RSpec.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

19 entries across 19 versions & 3 rubygems

Version Path
activeadmin-rb-1.6.0 spec/unit/component_spec.rb
activeadmin-rb-1.5.2 spec/unit/component_spec.rb
activeadmin-rb-1.5.1 spec/unit/component_spec.rb
activeadmin-rb-1.5.0 spec/unit/component_spec.rb
activeadmin_addons-1.7.1 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin-rb-1.4.0 spec/unit/component_spec.rb
activeadmin_addons-1.7.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin-1.3.1 spec/unit/component_spec.rb
activeadmin_addons-1.6.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin_addons-1.5.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin-1.3.0 spec/unit/component_spec.rb
activeadmin_addons-1.4.0 vendor/bundle/ruby/2.2.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin_addons-1.3.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin_addons-1.2.0 vendor/bundle/ruby/2.3.0/bundler/gems/activeadmin-f71b375325eb/spec/unit/component_spec.rb
activeadmin-1.2.1 spec/unit/component_spec.rb
activeadmin-1.2.0 spec/unit/component_spec.rb
activeadmin-1.1.0 spec/unit/component_spec.rb
activeadmin-1.0.0 spec/unit/component_spec.rb
activeadmin-1.0.0.pre5 spec/unit/component_spec.rb