Skip to content

Instantly share code, notes, and snippets.

@rokumatsumoto
Created February 23, 2019 10:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rokumatsumoto/9195be2efc851452f172d93f10549530 to your computer and use it in GitHub Desktop.
Save rokumatsumoto/9195be2efc851452f172d93f10549530 to your computer and use it in GitHub Desktop.
Multiple types of specs in metadata
%i(feature request).each do |type|
config.when_first_matching_example_defined(type: type) do
# enable db support only for feature or request specs
require 'support/db'
end
# include these Helpers only into feature or request specs
config.include(Helpers, type: type)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment