为什么 RSpec 在我的终端屏幕顶部打印出一串大写的 F?

Why is RSpec printing a string of capital F's out on the top of my terminal screen?

我刚刚像往常一样尝试 运行ning rspec,这应该给我一个如下所示的输出:

karenlee@Karens-MBP karen_lee % rspec

#caesar_cipher
  encodes a simple word
  wraps around the alphabet
  encodes multiple words

#digital_root
  calculates the digital root of a single-digit number
  calculates the digital root of a larger number

但是当我今天 运行 它时,它给了我这样的输出:

karenlee@Karens-MBP mancala % rspec
FFFFFFFFFFFFFFFFF

Failures:

  1) Board#initialize creates a set of 14 cups
     Failure/Error: @cups = Set.new(14)

     ArgumentError:
       value must be enumerable

另一方面,我也刚刚在 Visual Studio 的 LiveShare(我是主持人)上进行了结对编程,我注意到每当我的搭档在共享中输入 "rspec" VS Code 上的终端屏幕,rspec 的输出就像这个 post 中的第一个示例。那么为什么当我在自己的机器上 运行 "rspec" 时,它打印出 "F" 的字符串而不是第一个示例中的实际规格?

我仔细检查了我的 gem 列表,我安装了以下 rspec gem(对于 rspec):

rspec (3.9.0, 3.1.0)
rspec-core (3.9.0, 3.1.7)
rspec-expectations (3.9.0, 3.1.2)
rspec-mocks (3.9.0, 3.1.3)
rspec-support (3.9.0, 3.1.2)
rubygems-update (3.0.6)

此输出格式由 --format 选项控制。

但是 rspec 还有另一个功能,它从项目中的 .rspec 文件中读取选项,因此您可能想要

$ cat .rspec
--color
--require rails_helper

检查 rspec -h 以了解更多信息

  **** Output ****

    -f, --format FORMATTER             Choose a formatter.
                                         [p]rogress (default - dots)
                                         [d]ocumentation (group and example names)
                                         [h]tml
                                         [j]son
                                         custom formatter class name

F表示失败,.(点)表示合格的格式称为progress格式。您的伴侣拥有的另一个可能是 documentation