bugfix: support multiple computed calls to describe

fixes #246
This commit is contained in:
Dominik Richter 2015-11-19 14:24:46 +01:00
parent d9ded1d38d
commit a04ff021c6

View file

@ -5,6 +5,7 @@
require 'inspec/rule'
require 'inspec/dsl'
require 'rspec/core/dsl'
require 'securerandom'
module Inspec
class ProfileContext # rubocop:disable Metrics/ClassLength
@ -110,7 +111,7 @@ module Inspec
define_method :describe do |*args, &block|
path = block.source_location[0]
line = block.source_location[1]
id = "#{File.basename(path)}:#{line}"
id = "#{File.basename(path)}:#{line} #{SecureRandom.hex}"
rule = rule_class.new(id, {}) do
describe(*args, &block)
end