Sha256: 72c7ee47fa6ac199262765f05d4dc820121e5e2b4a1cd5f812bc017acb2fc6ff

Contents?: true

Size: 628 Bytes

Versions: 1

Compression:

Stored size: 628 Bytes

Contents

# encoding: UTF-8

require 'test_helper'

module Smurfville
  class StyleguideHelperTest < ActionView::TestCase
    test 'foreground_color' do
      # dark colors
      assert_equal "white", foreground_color("red")
      assert_equal "white", foreground_color("#012123")
      assert_equal "white", foreground_color("#000")

      # bright colors
      assert_equal "black", foreground_color("#efefef")
      assert_equal "black", foreground_color("white")

      # non-colors
      # => black = default
      assert_equal "black", foreground_color("türkis")
      assert_equal "black", foreground_color(nil)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
smurfville-0.0.6 test/unit/helpers/smurf/styleguide_helper_test.rb