Sha256: c84c626406394366d8b6a61d4a2eb39a1fd22439dc3e1dc8c3122d27bcaa90c9

Contents?: true

Size: 613 Bytes

Versions: 4

Compression:

Stored size: 613 Bytes

Contents

require 'spec_helper' 
include ActiveAdmin

module ActiveAdmin
  module Axlsx
    describe Resource do
      let(:resource) { ActiveAdmin.register(Post) }

      let(:custom_builder) do
        Builder.new(Post) do |builder|
          column(:fake) { :fake }
        end
      end

      context 'when registered' do
        it "each resource has an xlsx_builer" do
          resource.xlsx_builder.should be_a(Builder)
        end

        it "We can specify our own configured builder" do
          lambda { resource.xlsx_builder = custom_builder }.should_not raise_error
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
activeadmin-axlsx-2.1.2 spec/axlsx/unit/resource_spec.rb
activeadmin-axlsx-2.1.1 spec/axlsx/unit/resource_spec.rb
activeadmin-axlsx-2.0.1 spec/axlsx/unit/resource_spec.rb
activeadmin-axlsx-2.0.0 spec/axlsx/unit/resource_spec.rb