aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/emoji_spec.rb
diff options
context:
space:
mode:
authorMarkus Reiter2017-02-12 21:46:15 +0100
committerMarkus Reiter2017-02-12 21:46:15 +0100
commit6799081f8a156fbb07246cab936717fc00826857 (patch)
tree6ad4a8c4e68f854ceea11c38f23dee63f7544455 /Library/Homebrew/test/emoji_spec.rb
parent08c75616396371be93ab6129a71c5d8b91d6c2be (diff)
downloadbrew-6799081f8a156fbb07246cab936717fc00826857.tar.bz2
Convert Emoji test to spec.
Diffstat (limited to 'Library/Homebrew/test/emoji_spec.rb')
-rw-r--r--Library/Homebrew/test/emoji_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/Library/Homebrew/test/emoji_spec.rb b/Library/Homebrew/test/emoji_spec.rb
new file mode 100644
index 000000000..35d077ebe
--- /dev/null
+++ b/Library/Homebrew/test/emoji_spec.rb
@@ -0,0 +1,16 @@
+require "emoji"
+
+describe Emoji do
+ describe "#install_badge" do
+ subject { described_class.install_badge }
+
+ 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