Skip to content

Instantly share code, notes, and snippets.

@thenoseman
Created April 10, 2015 06:23
Show Gist options
  • Save thenoseman/f11ab1749ffa6b91ec09 to your computer and use it in GitHub Desktop.
Save thenoseman/f11ab1749ffa6b91ec09 to your computer and use it in GitHub Desktop.
Setting rspec metadata dynamically
RSpec.configure do |config|
# Auto tagging: Add mandant tag to directory specific specs
SELF_CARE_MANDANTS.each do |mandant_name|
config.define_derived_metadata(:file_path => %r{/spec/integration/self_care/#{mandant_name.underscore}}) do |metadata|
metadata[mandant_name.to_sym] = true
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment