Module: Lime::DSL
- Defined in:
- lib/lime.rb
Overview
Toplevel DSL.
Instance Method Summary collapse
-
#Feature(label, &block) ⇒ Object
(also: #feature)
Define a feature.
-
#require_featurettes(feature_dir) ⇒ Object
Require any featurettes located in ‘feature_dir/featurettes` directory.
Instance Method Details
#Feature(label, &block) ⇒ Object Also known as: feature
Define a feature.
24 25 26 27 28 |
# File 'lib/lime.rb', line 24 def Feature(label, &block) require_featurettes(File.dirname(caller[0])) $TEST_SUITE << Lime::Feature.new(:label=>label, &block) end |
#require_featurettes(feature_dir) ⇒ Object
Require any featurettes located in ‘feature_dir/featurettes` directory.
35 36 37 38 39 40 41 42 43 |
# File 'lib/lime.rb', line 35 def require_featurettes(feature_dir) featurettes_dir = File.join(feature_dir, 'featurettes') if File.directory?(featurettes_dir) featurette_files = Dir[File.join(featurettes_dir, '*.rb')] featurette_files.each do |file| require file end end end |