Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
RSpec: Add metadata based on path

RSpec: Add metadata based on path

RSpec.configure do |config|
  config.define_derived_metadata(file_path: %r{platforms/.*/spec/controllers/}) do |metadata|
    metadata[:type] = :controller
    metadata[:platform_controller] = true

  config.include MainAppRoutesHelper, platform_controller: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.