Merge pull request #2000 from reitermarkus/spec-emoji
Convert Emoji test to spec.
This commit is contained in:
commit
1f5e91da0b
16
Library/Homebrew/test/emoji_spec.rb
Normal file
16
Library/Homebrew/test/emoji_spec.rb
Normal file
@ -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
|
||||
@ -1,11 +0,0 @@
|
||||
require "testing_env"
|
||||
require "emoji"
|
||||
|
||||
class EmojiTest < Homebrew::TestCase
|
||||
def test_install_badge
|
||||
assert_equal "🍺", Emoji.install_badge
|
||||
|
||||
ENV["HOMEBREW_INSTALL_BADGE"] = "foo"
|
||||
assert_equal "foo", Emoji.install_badge
|
||||
end
|
||||
end
|
||||
Loading…
x
Reference in New Issue
Block a user