rspec专题提供rspec的最新资讯内容,帮你更好的了解rspec。
在我的一种规格中,我有以下期望: <pre class="lang-rb prettyprint-override"><code>expect(Rails.logger).not_to receive(
Bundler花费很长的时间来加载文件,我正试图查明原因: <pre><code>$ bundle exec rspec &lt;bunch of output&gt; F
在我的应用程序中,我有一个名为<strong> License </strong>的模型。这些是该模型的以下关联: <pre><code>
<pre><code>def some_method subject.put(1) subject.put(2) ... end </code></pre> 由于对<code>put</code>的调用不止一次,因
<h1>问题</h1> 在Github的CI上运行时,尝试访问页面时出现<code>SocketError: getaddrinfo: Name or service not known</code>
我正在像这样编写rspec测试 <pre><code>Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY,21); cal.set(Calen
<strong> app / models / author.rb:</strong> <pre><code> class Author &lt; ApplicationRecord vali
最近在我的大多数页面中添加了反跳之后,使用Rspec和Capybara,测试现在随机失败。 现在在本地这
我是Ruby,Rails和TDD的新手,在测试过程中遇到了麻烦。 我正在尝试测试由FactoryBot创建的用户发布的食谱
<pre><code> describe &#34;changes shopping array length&#34; do subject { described_class.new.change_array_length(group: [], num: 2) } it &
使用Ruby on Rails中的RSwag和RSpec,是否可以通过<code>parameter</code>发送未定义为<code>run_test!</code>的参数?
仅在评估<code>with</code>块之后,如何评估<code>expect</code>自变量? <pre><code>let(:job) { create(:job) } it do
<strong>摘要</strong> 我正在构建一个包含用户注册过程的Rails应用。 <code>username</code>和<code>password</c
我是Ruby开发生态系统的新手,在业余时间学习Rails。但是,我想从头开始构建一个命令行应用程序,并
我是Rails的初学者,正在尝试测试Rails应用程序 我的页面工作正常,但是在进行集成测试时,出现
如何在rspec中编写模拟模型,该模型应返回模型对象而不是数组。 <pre><code>let(:item1) { mock_model(Item, item
我有一个项目,其中我必须在rswag中编写嵌套属性 <pre><code>{ &#34;question_bank&#34;: { &#34;question_exams_a
我正在用rspec编写测试。我想通过从创建的事件中获取所有ID并在我的删除api网址中使用它们来清理测试
我们的gem首先从Railtie的<code>add_helper</code>中的静态<code>yml</code>文件中读取名为<code>config.before_configuration<
<strong>背景</strong>: 我们有一个服务的单一仓库,每个服务都有单元测试,并使用rspec运行自己的测试