Sha256: 2d9957efe67a74bde03873be528ec38049fd3952ddeac8d68a7d306931a52a3a

Contents?: true

Size: 436 Bytes

Versions: 11

Compression:

Stored size: 436 Bytes

Contents

# coding: utf-8

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

11 entries across 11 versions & 2 rubygems

Version Path
pokedex-terminal-0.2.8 vendor/bundle/ruby/2.7.0/gems/pastel-0.7.3/spec/unit/respond_to_spec.rb
pokedex-terminal-0.2.7 vendor/bundle/ruby/2.7.0/gems/pastel-0.7.3/spec/unit/respond_to_spec.rb
pokedex-terminal-0.2.6 vendor/bundle/ruby/2.7.0/gems/pastel-0.7.3/spec/unit/respond_to_spec.rb
pokedex-terminal-0.2.5 vendor/bundle/ruby/2.7.0/gems/pastel-0.7.3/spec/unit/respond_to_spec.rb
pokedex-terminal-0.2.4 vendor/bundle/ruby/2.7.0/gems/pastel-0.7.3/spec/unit/respond_to_spec.rb
pastel-0.7.3 spec/unit/respond_to_spec.rb
pastel-0.7.2 spec/unit/respond_to_spec.rb
pastel-0.7.1 spec/unit/respond_to_spec.rb
pastel-0.7.0 spec/unit/respond_to_spec.rb
pastel-0.6.1 spec/unit/respond_to_spec.rb
pastel-0.6.0 spec/unit/respond_to_spec.rb