Sha256: cef3aa152c826f88ed36c3169139a45caf1703b6afe469456698c5cf2d421ee3

Contents?: true

Size: 660 Bytes

Versions: 6

Compression:

Stored size: 660 Bytes

Contents

require 'test_helper'

class BuoysLoaderTest < ActiveSupport::TestCase
  test '.buoy_files' do
    assert_equal Buoys::Loader.buoy_files.size, 2

    assert Buoys::Loader.buoy_files.include?(Rails.root.join('config', 'buoys', 'buoys.rb').to_s)
    assert Buoys::Loader.buoy_files.include?(Rails.root.join('config', 'buoys', 'breadcrumb.rb').to_s)
  end

  test '.buoys' do
    Buoys::Loader.load_buoys_files

    actual_keys = []
    expected_keys = %i(account books show_books about history help)
    expected_keys.each do |key|
      actual_keys << key if Buoys::Loader.buoys.keys.include?(key)
    end

    assert_equal actual_keys, expected_keys
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
buoys-0.6.0 test/buoys_loader_test.rb
buoys-0.5.0 test/buoys_loader_test.rb
buoys-0.4.0 test/buoys_loader_test.rb
buoys-0.3.0 test/buoys_loader_test.rb
buoys-0.2.0 test/buoys_loader_test.rb
buoys-0.1.0 test/buoys_loader_test.rb