Sha256: 0eaa31894ba751a18b06318c20943787170892075fe4537b7bc7f67b61f9e14d

Contents?: true

Size: 953 Bytes

Versions: 97

Compression:

Stored size: 953 Bytes

Contents

Shindo.tests('test_helper', 'meta') do

  tests('#formats_kernel') do

    tests('returns true') do

      test('when format of value matches') do
        formats_kernel({:a => :b}, {:a => Symbol})
      end

      test('when format of nested array elements matches') do
        formats_kernel({:a => [:b, :c]}, {:a => [Symbol]})
      end

      test('when format of nested hash matches') do
        formats_kernel({:a => {:b => :c}}, {:a => {:b => Symbol}})
      end

      test('when format of an array') do
        formats_kernel([{:a => :b}], [{:a => Symbol}])
      end

    end

    tests('returns false') do

      test('when format of value does not match') do
        !formats_kernel({:a => :b}, {:a => String})
      end

      test('when not all keys are checked') do
        !formats_kernel({:a => :b}, {})
      end

      test('when some keys do not appear') do
        !formats_kernel({}, {:a => String})
      end

    end

  end

end

Version data entries

97 entries across 97 versions & 5 rubygems

Version Path
brightbox-cli-0.14.1 lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper_tests.rb
brightbox-cli-0.14.0 lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper_tests.rb
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper_tests.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/tests/helpers/formats_helper_tests.rb
fog-0.11.0 tests/helpers/formats_helper_tests.rb
fog-0.10.0 tests/helpers/formats_helper_tests.rb
fog4encbs-0.9.0.1 tests/helpers/formats_helper_tests.rb
fog4encbs-0.9.0 tests/helpers/formats_helper_tests.rb
fog-0.9.0 tests/helpers/formats_helper_tests.rb
fog-0.8.2 tests/helpers/formats_helper_tests.rb
fog-0.8.1 tests/helpers/formats_helper_tests.rb
fog-0.8.0 tests/helpers/formats_helper_tests.rb
fog-0.7.2 tests/helpers/formats_helper_tests.rb
fog-0.7.1 tests/helpers/formats_helper_tests.rb
fog-0.7.0 tests/helpers/formats_helper_tests.rb
fog-0.6.0 tests/helpers/formats_helper_tests.rb
fog-0.5.3 tests/helpers/formats_helper_tests.rb
fog-0.5.2 tests/helpers/formats_helper_tests.rb
fog-0.5.1 tests/helpers/formats_helper_tests.rb
fog-0.5.0 tests/helpers/formats_helper_tests.rb