Sha256: eb1272f24c25a50facefc97512c129d5edd722e78e45fb0b1bf77bb3f45c20b2
Contents?: true
Size: 500 Bytes
Versions: 11
Compression:
Stored size: 500 Bytes
Contents
# encoding: utf-8 RSpec.describe Pastel::Color, '#lookup' do it "looksup colors" do color = described_class.new(enabled: true) expect(color.lookup(:red, :on_green, :bold)).to eq("\e[31;42;1m") end it "caches color lookups" do color = described_class.new(enabled: true) allow(color).to receive(:code).and_return([31]) color.lookup(:red, :on_green) color.lookup(:red, :on_green) color.lookup(:red, :on_green) expect(color).to have_received(:code).once end end
Version data entries
11 entries across 11 versions & 2 rubygems