Created
February 23, 2019 10:30
-
-
Save rokumatsumoto/9195be2efc851452f172d93f10549530 to your computer and use it in GitHub Desktop.
Multiple types of specs in metadata
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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