aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/test/test_irb.rb
blob: bf35b65241132f87b81bbbc65018d57dae0278b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
require "helper/integration_command_test_case"

class IntegrationCommandTestIrb < IntegrationCommandTestCase
  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