lib/henry/task/rspec_task.rb in henry-container-0.0.50 vs lib/henry/task/rspec_task.rb in henry-container-0.0.51
- old
+ new
@@ -56,11 +56,11 @@
# Returns the custom rspec_opts that user may have passed.
#
# @return [String]
def custom_options
- "#{self.format_options} #{self.report_options}"
+ "#{self.format_options} #{self.tags_options} #{self.report_options}"
end
# Returns the default rspec_opts.
#
# @return [String]
@@ -71,9 +71,20 @@
# Returns the rspec_opts related with formatting.
#
# @return [String]
def format_options
"--format #{self.data.options['format'] || 'documentation'} --out #{OUT_PATH}"
+ end
+
+ # Returns the rspec_opts related with tags to be run.
+ #
+ # @return [String]
+ def tags_options
+ return '' if self.data.options['tags'].nil?
+
+ self.data.options['tags'].collect do |tag|
+ "--tag #{tag}"
+ end.join(' ')
end
# Returns the rspec_opts related with report paaths and formats.
#
# @return [String]