Module: DNApi::Test::Ext

Included in:
Struct
Defined in:
lib/dnapi/test/ext.rb

Instance Method Summary collapse

Instance Method Details

#default_fauxture_nameObject



27
28
29
# File 'lib/dnapi/test/ext.rb', line 27

def default_fauxture_name
  :default
end

#fixture(name = default_fauxture_name, &blk) ⇒ Object Also known as: fix



4
5
6
# File 'lib/dnapi/test/ext.rb', line 4

def fixture(name = default_fauxture_name, &blk)
  Sweatshop.add(self, name, &blk)
end

#generate(name = default_fauxture_name, attributes = {}) ⇒ Object Also known as: gen



10
11
12
13
# File 'lib/dnapi/test/ext.rb', line 10

def generate(name = default_fauxture_name, attributes = {})
  name, attributes = default_fauxture_name, name if name.is_a? Hash
  Sweatshop.make(self, name, attributes)
end

#generate_attributes(name = default_fauxture_name) ⇒ Object Also known as: gen_attrs



17
18
19
# File 'lib/dnapi/test/ext.rb', line 17

def generate_attributes(name = default_fauxture_name)
  Sweatshop.attributes(self, name)
end

#pick(name = default_fauxture_name) ⇒ Object



23
24
25
# File 'lib/dnapi/test/ext.rb', line 23

def pick(name = default_fauxture_name)
  Sweatshop.pick(self, name)
end