Class: Storexplore::Testing::DummyData
- Inherits:
-
Object
- Object
- Storexplore::Testing::DummyData
- Defined in:
- lib/storexplore/testing/dummy_data.rb
Overview
Dummy data generator for Storexplore::Testing::DummyStore store generation
Class Method Summary collapse
-
.attributes(name, options) ⇒ Object
A new unique set of standard store item attributes.
-
.name(kind) ⇒ Object
A new unique name.
Class Method Details
.attributes(name, options) ⇒ Object
A new unique set of standard store item attributes.
35 36 37 38 39 40 41 42 43 |
# File 'lib/storexplore/testing/dummy_data.rb', line 35 def self.attributes(name, ) { name: name, brand: brand(name), image: image(name), remote_id: remote_id, price: price(name) }.merge() end |
.name(kind) ⇒ Object
A new unique name.
30 31 32 |
# File 'lib/storexplore/testing/dummy_data.rb', line 30 def self.name(kind) "#{kind.capitalize}-#{new_int}" end |