Sha256: b7547a7d7f8da189179c5e4329c5d62289137958dbc1d0aea87a15d3bf99534c

Contents?: true

Size: 1.15 KB

Versions: 26

Compression:

Stored size: 1.15 KB

Contents

require 'test_helper'

class InvalidRenderer
end

class ActiveListTest < ActiveSupport::TestCase
  # include AppMockHelper

  def test_add_renderer
    assert_raise ArgumentError do
      ActiveList.register_renderer(InvalidRenderer)
    end
  end

  def test_existing_renderers
    assert ActiveList.renderers.any?, 'No renderer found'

    ActiveList.renderers.each do |name, renderer|
      assert renderer.instance_methods.include?(:remote_update_code), "Renderer #{name} does not respond to :remote_update_code"
      assert renderer.instance_methods.include?(:build_data_code),    "Renderer #{name} does not respond to :build_data_code"
    end
  end

  def test_existing_exporters
    assert ActiveList.exporters.any?, 'No exporter found'

    ActiveList.exporters.each do |name, exporter|
      assert exporter.instance_methods.include?(:send_data_code), "Exporter #{name} does not respond to :send_data_code"
      assert exporter.instance_methods.include?(:mime_type),      "Exporter #{name} does not respond to :mime_type"
      assert exporter.instance_methods.include?(:file_extension), "Exporter #{name} does not respond to :file_extension"
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
active_list-8.1.0 test/active_list_test.rb
active_list-7.3.0 test/active_list_test.rb
active_list-8.0.0 test/active_list_test.rb
active_list-7.2.0 test/active_list_test.rb
active_list-7.1.0 test/active_list_test.rb
active_list-7.0.0 test/active_list_test.rb
active_list-6.10.0 test/active_list_test.rb
active_list-6.9.4 test/active_list_test.rb
active_list-6.9.3 test/active_list_test.rb
active_list-6.9.2 test/active_list_test.rb
active_list-6.9.1 test/active_list_test.rb
active_list-6.9.0 test/active_list_test.rb
active_list-6.8.3 test/active_list_test.rb
active_list-6.8.2 test/active_list_test.rb
active_list-6.8.1 test/active_list_test.rb
active_list-6.8.0 test/active_list_test.rb
active_list-6.7.6 test/active_list_test.rb
active_list-6.7.5 test/active_list_test.rb
active_list-6.7.4 test/active_list_test.rb
active_list-6.7.3 test/active_list_test.rb