diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-10-31 02:44:47 +0000 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2018-10-31 02:44:47 +0000 |
commit | f073035d0b680b39cf5e01e45a46459229dd2627 (patch) | |
tree | 41452f9906497da34133f83da2ce4faa1b0426c0 /qa/qa/factory/base.rb | |
parent | 8bc8661499670160a183e78d416b581726619439 (diff) | |
parent | e7741b0e5247024998bad7de6ebba33933db266a (diff) | |
download | gitlab-ce-f073035d0b680b39cf5e01e45a46459229dd2627.tar.gz |
Merge branch '52992-absorb-qa-product-qa' into 'master'
CE: Absorb product into factory
See merge request gitlab-org/gitlab-ce!22698
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! |