rspec-expectations:提供可读的API来表达代码示例的预期结果

时间:2024-02-28 23:44:51
【文件属性】:

文件名称:rspec-expectations:提供可读的API来表达代码示例的预期结果

文件大小:293KB

文件格式:ZIP

更新时间:2024-02-28 23:44:51

Ruby

RSpec期望 RSpec :: Expectations使您可以在示例中表达对象的预期结果。 expect ( account . balance ) . to eq ( Money . new ( 37.42 , :USD ) ) 安装 如果您想将rspec-expectations与rspec一起使用,只需安装rspec gem,RubyGems还将为您安装rspec-expectations(以及rspec-core和rspec-mocks): gem install rspec 想要与main分支对抗吗? 您还需要包括相关的RSpec存储库。 将以下内容添加到您的Gemfile : %w[ rspec-core rspec-expectations rspec-mocks rspec-support ] . each do | lib | gem lib , :git


网友评论