Sha256: e4eb564974f04b3774c60da52a7bd7005a18b6001af78ffaaa9334e70b07c099

Contents?: true

Size: 620 Bytes

Versions: 2

Compression:

Stored size: 620 Bytes

Contents

require 'spec_helper'

describe Daigaku::Coloring do

  subject do
    class Example
      include Daigaku::Coloring
    end

    Example.new
  end

  it 'has the protected method #init_colors' do
    expect(subject.protected_methods).to include :init_colors
  end

  [
    :COLOR_TEXT,
    :COLOR_TEXT_EMPHASIZE,
    :COLOR_HEADING,
    :COLOR_RED,
    :COLOR_GREEN,
    :COLOR_YELLOW,
    :BACKGROUND,
    :FONT,
    :FONT_HEADING,
    :FONT_EMPHASIZE,
    :RED,
    :GREEN,
    :YELLOW
  ].each do |const|
    it "has the constant #{const}" do
      expect(Example.const_defined?(const)).to be true
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
daigaku-0.3.0 spec/daigaku/coloring_spec.rb
daigaku-0.2.0 spec/daigaku/coloring_spec.rb