Skip to content
#

rspec

Here are 967 public repositories matching this topic...

mutant
matthias-g
matthias-g commented Nov 18, 2018

In the following scenario, replacing the body of Child#one with super causes a SystemStackError when Child#one is being called. However mutant does not detect that this error kills the mutation that replaces the method's body with super. See https://github.com/matthias-g/mutant_super_bug for a running example.

class Parent
  attr_reader :foo

  def initialize(foo)
    @foo = fo
khiav223577
khiav223577 commented Apr 3, 2020

Error Messages

Coverage report generated for RSpec to /mnt/c/Users/b9990/Documents/GitHub/compassbioinfo/good_will_mina_api/coverage. 1125 / 1181 LOC (95.26
%) covered.
SimpleCov failed with exit 1
Traceback (most recent call last):
        45: from /home/khiav/.rvm/gems/ruby-2.5.5/gems/rspec-core-3.9.1/exe/rspec:4:in `<main>'
        44: from /home/khiav/.rvm/gems/ruby-2.5.5/gems/r
ckthiessen
ckthiessen commented Feb 27, 2020

The query to determine if a rest api exists is using the #get_rest_apis method from the apigateway client, which has a default to only return 25 rest apis. If my API Gateway instance has more than 25 rest apis, some of the tests fail even though the APIs that the tests fail on exist in my API Gateway. This can be fixed by increasing the number of returned APIs to the maximum of 500 using the `limi

adamscharf
adamscharf commented Sep 15, 2017

Description

After running chefspec, the summary output for tests are no longer displaying the verbs. Is this a recent change to the coding standard and I need to update my tests or a bug with ChefSpec?

e.g.,

Tests

expect(chef_run).to create_directory('/opt/my-folder').with(
  owner: 'root',
  group: 'root',
  mode: '0755',
  )
end

it do
  expect(chef_run).to inst
dgollahon
dgollahon commented Feb 22, 2019

When using include_examples a new RSpec context is not created, unlike with it_behaves_like. It is a common mistake to write something like:

include_examples 'my thing' do
  let(:a) { 'a')
end

include_examples 'my thing' do
  let(:a) { 'b')
end

And the author of the test might not realize that a will be defined as 'b' in both cases. (NOTE: I'm writing this sa

cop
nanophate
nanophate commented Feb 1, 2017

問題

一つの同じContextの中でinclude_examplesし、その中でdescriptionを定義すると、後勝ちでdescriptionが上書きされます。

以下のような👇の内容を実行したところこのバグを発見しました。

require 'rails_helper'

RSpec.describe 'Users', :autodoc do

  describe 'GET /users/:user_id' do
    let(:user) { create(:user) }

    shared_examples 'page not found' do
     it { is_expected.to eq(404) }
    end

    shared_examples 'page accesa
TFAstudio
TFAstudio commented Aug 29, 2017

Love the idea of BDD and NSpec as a concept looks so much easier writing tests than the standard unit testing frameworks.

However, using the 'Getting Started' guide on the nspec.org, I quickly found that either it is out of date or incorrect. The examples in the page do not run as stated. By downloading the examples in github, I noticed that you are using Shouldly rather than FluentAssertions

KiranJosh
KiranJosh commented Jan 29, 2020

Started GET "/api/docs" for ::1 at 2020-01-29 19:34:08 +0530
Processing by Apitome::DocsController#index as HTML
Rendering /home/kiran/.rvm/gems/ruby-2.6.0/gems/apitome-0.3.0/app/views/apitome/docs/index.html.erb within layouts/apitome/application
Rendered /home/kiran/.rvm/gems/ruby-2.6.0/gems/apitome-0.3.0/app/views/apitome/docs/_explanation.html.erb (Duration: 1.6ms | Allocations: 6077)

Improve this page

Add a description, image, and links to the rspec topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the rspec topic, visit your repo's landing page and select "manage topics."

Learn more

You can’t perform that action at this time.