aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/emoji_spec.rb
blob: d6341968e9b141cc345bd463b6a44b7187c716f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require "emoji"

describe Emoji do
  describe "#install_badge" do
    subject { described_class.install_badge }

    before(:each) do
      ENV.delete("HOMEBREW_NO_EMOJI")
      ENV.delete("HOMEBREW_INSTALL_BADGE")
    end

    it "returns 🍺  by default" do
      expect(subject).to eq "🍺"
    end

    it "returns the contents of HOMEBREW_INSTALL_BADGE if set" do
      ENV["HOMEBREW_INSTALL_BADGE"] = "foo"
      expect(subject).to eq "foo"
    end
  end
end