rspec-wait:等待RSpec中的条件

时间:2021-05-15 00:32:28
【文件属性】:
文件名称:rspec-wait:等待RSpec中的条件
文件大小:15KB
文件格式:ZIP
更新时间:2021-05-15 00:32:28
Ruby RSpec ::等待 等待RSpec中的条件 为什么RSpec :: Wait存在? 时机很难。 时间问题和竞赛条件可能会困扰您的测试套件。 随着测试套件的可靠性逐渐降低,开发速度和质量都会受到影响。 RSpec :: Wait致力于简化异步或慢速交互的测试。 RSpec :: Wait如何工作? RSpec :: Wait允许您使用已经知道和喜欢的RSpec语法糖来等待声明通过。 RSpec :: Wait将继续尝试,直到您的断言通过或超时为止。 例子 RSpec :: Wait的wait_for断言几乎替代了RSpec的expect断言。 主要区别在于wait_for方法仅适用于非块匹配器。 但是, wait_for仍将接受一个块,因为它可能需要在等待时多次评估该块的内容。 describe Ticker do subject ( :ticker ) { Ticker
【文件预览】:
rspec-wait-master
----rspec-wait.gemspec(808B)
----gemfiles()
--------rspec_3_0.gemfile(219B)
--------rspec_3_6.gemfile(145B)
--------rspec_3_3.gemfile(219B)
--------rspec_3_5.gemfile(145B)
--------rspec_3_4.gemfile(145B)
--------rspec_3_2.gemfile(219B)
--------rspec_3_1.gemfile(219B)
--------rspec_3_7.gemfile(145B)
----LICENSE.txt(1KB)
----lib()
--------rspec()
----Gemfile(141B)
----spec()
--------spec_helper.rb(99B)
--------wait_spec.rb(5KB)
--------wait_for_spec.rb(5KB)
----Rakefile(248B)
----CONTRIBUTING.md(2KB)
----.travis.yml(585B)
----README.md(5KB)
----.rubocop.yml(522B)
----.rspec(68B)
----.gitignore(135B)
----CHANGELOG.md(735B)

网友评论