diff options
Diffstat (limited to 'qa/qa/factory/base.rb')
-rw-r--r-- | qa/qa/factory/base.rb | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/qa/qa/factory/base.rb b/qa/qa/factory/base.rb index e82e16f9415..e28a00c545b 100644 --- a/qa/qa/factory/base.rb +++ b/qa/qa/factory/base.rb @@ -22,12 +22,16 @@ module QA visit(web_url) end + def populate(*attributes) + attributes.each(&method(:public_send)) + end + private def populate_attribute(name, block) value = attribute_value(name, block) - raise NoValueError, "No value was computed for product #{name} of factory #{self.class.name}." unless value + raise NoValueError, "No value was computed for #{name} of #{self.class.name}." unless value value end @@ -84,7 +88,7 @@ module QA resource_web_url = yield factory.web_url = resource_web_url - Factory::Product.new(factory) + factory end private_class_method :do_fabricate! |