Sha256: 52244cddfe872be2bc178b65b7ff80aad7876e47d316a4fc05ed06cdd6af1146

Contents?: true

Size: 459 Bytes

Versions: 5

Compression:

Stored size: 459 Bytes

Contents

# coding: utf-8

require 'spec_helper'

RSpec.describe Pastel, '.respond_to?' do
  subject(:pastel) { described_class.new(enabled: true) }

  it "responds correctly to color method" do
    expect(pastel.respond_to?(:decorate)).to eq(true)
  end

  it "responds correctly to color property" do
    expect(pastel.respond_to?(:red)).to eq(true)
  end

  it "responds correctly to unkown method" do
    expect(pastel.respond_to?(:unknown)).to eq(false)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pastel-0.5.3 spec/unit/respond_to_spec.rb
pastel-0.5.2 spec/unit/respond_to_spec.rb
pastel-0.5.1 spec/unit/respond_to_spec.rb
pastel-0.5.0 spec/unit/respond_to_spec.rb
pastel-0.4.0 spec/unit/respond_to_spec.rb