brew/Library/Homebrew/test/emoji_spec.rb
Mike McQuaid 5e1806e796 test: rubocop-rspec style auto-corrects.
There’s too many warnings to start enabling `rubocop-rspec` by default
but let’s at least apply the cleanups it does automatically.
2018-03-25 13:30:37 +01:00

22 lines
460 B
Ruby

require "emoji"
describe Emoji do
describe "#install_badge" do
subject { described_class.install_badge }
before 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