tests: add cmd/irb integration test (#501)

This commit is contained in:
Andrea Kao 2016-07-19 08:33:36 -07:00 committed by Martin Afanasjew
parent 4b40a87ca4
commit 4f95f7ff84

View File

@ -690,4 +690,20 @@ class IntegrationCommandTests < Homebrew::TestCase
cmd("install", "testball")
assert_match "Would remove", cmd("unlink", "--dry-run", "testball")
end
def test_irb
assert_match "'v8'.f # => instance of the v8 formula",
cmd("irb", "--examples")
setup_test_formula "testball"
irb_test = HOMEBREW_TEMP/"irb-test.rb"
irb_test.write <<-EOS.undent
"testball".f
:testball.f
exit
EOS
assert_match "Interactive Homebrew Shell", cmd("irb", irb_test)
end
end