RSpec 运行程序和格式化器
rspec-core 提供了用于编写可执行示例的结构,这些示例说明了您的应用程序如何运行。
代码应该如何表现,以及一个带有用于限制哪些测试的工具的 rspec 命令。
运行示例并自定义输出。
**这是旧的 rspec 核心仓库,请参阅 monorepo rspec/rspec 以了解新的问题和版本。
gem install rspec # 为 rspec-core、rspec-expectations 和 rspec-mocks 提供支持
gem install rspec-core # 仅用于 rspec-core
rspec --help
要运行 main 分支吗?您需要包含依赖项
还需要 RSpec 仓库。请在 Gemfile 中添加以下内容:
%w[rspec rspec-core rspec-expectations rspec-mocks rspec-support].each do |lib|
gem lib, :git => "https://github.com/rspec/#{lib}.git", :branch => 'main'
endRSpec 使用 "describe" 和 "it" 这两个词,因此我们可以表达诸如对话这样的概念:
暂无开放 Issues,或尚未同步最近议题。