Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Allow array as value for type key in Configuration#include #2890

@MatheusRich

Description

@MatheusRich

Subject of the issue

I want to be able to pass multiple types in the type config of the method RSpec::Core::Configuration#include. This would allow a cleaner configuration.

Your environment

  • Ruby version: ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-linux-musl]
  • rspec-core version: rspec-core 3.10.1

Steps to reproduce

This is the current way of including a config in multiple types:

RSpec.configure do |config|
  # ...

  config.include Capybara::RSpecMatchers, type: :request
  config.include Capybara::RSpecMatchers, type: :component
end

Expected behavior

Here's what I'd like to being able to do (We could add a key types if this change is not approved).

RSpec.configure do |config|
  # ...

  config.include Capybara::RSpecMatchers, type: [:request, :component]
end

Actual behavior

If an array is given, RSpec seems to ignore the option.

I'd be happy to provide a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions