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.

Unable to access inclusion_filter using RSpec.configuration. #1725

Closed
@kandadaboggu

Description

@kandadaboggu

I am trying to access the inclusion filters from a before(:suite) hook. Even though the value is passed in the command line I do not get any value when I try to access the filter.

RSpec.configure do |config|
  config.before :suite, type: :feature do
    if config.inclusion_filter[:use_ff]
      register_selenium
    else
      register_poltergeist
    end
  end
end

In the code above, the register_selenium section is never called even when I pass the tag.
For a good measure I tried to add few log statements before accessing the filter

puts config.inclusion_filter.empty? # returns true
puts config.inclusion_filter.description # returns {}

The filters are recognized by rspec as I see their names logged in the console:

Run options: include {:focus=>true, :use_ff=>true}

I am using version 3.1.4 of rspec-core

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