diff options
Diffstat (limited to 'Library/Homebrew/test/caveats_spec.rb')
| -rw-r--r-- | Library/Homebrew/test/caveats_spec.rb | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/Library/Homebrew/test/caveats_spec.rb b/Library/Homebrew/test/caveats_spec.rb new file mode 100644 index 000000000..d8be9dc52 --- /dev/null +++ b/Library/Homebrew/test/caveats_spec.rb @@ -0,0 +1,29 @@ +require "formula" +require "caveats" + +describe Caveats do + subject { described_class.new(f) } + let(:f) { formula { url "foo-1.0" } } + + specify "#f" do + expect(subject.f).to eq(f) + end + + describe "#empty?" do + it "returns true if the Formula has no caveats" do + expect(subject).to be_empty + end + + it "returns false if the Formula has caveats" do + f = formula do + url "foo-1.0" + + def caveats + "something" + end + end + + expect(described_class.new(f)).not_to be_empty + end + end +end |
