File: no_warnings_spec.rb

package info (click to toggle)
ruby-thor 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 924 kB
  • sloc: ruby: 9,491; makefile: 8; sh: 1
file content (16 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
require "open3"

context "when $VERBOSE is enabled" do
  it "prints no warnings" do
    root = File.expand_path("..", __dir__)
    _, err, = Open3.capture3("ruby -I #{root}/lib #{root}/spec/fixtures/verbose.thor")

    expect(err).to be_empty
  end

  it "prints no warnings even when erroring" do
    root = File.expand_path("..", __dir__)
    _, err, = Open3.capture3("ruby -I #{root}/lib #{root}/spec/fixtures/verbose.thor noop")
    expect(err).to_not match(/warning:/)
  end
end