Class: QTest::Module
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#module ⇒ Object
Returns the value of attribute module.
-
#project ⇒ Object
Returns the value of attribute project.
Instance Method Summary collapse
-
#child_module(opts = {}) ⇒ QTest::Module
Get a specific child Module under the Module.
-
#child_modules(opts = {}) ⇒ Array[QTest::Module]
Get all child Modules under the Module.
-
#create_test_case(opts = {}) ⇒ QTest::TestCase
Create a Test Case under the Module.
-
#test_cases ⇒ Array[QTest::TestCase]
Get all Test Cases under the Module.
Methods inherited from Base
#all, #create, find_by, #initialize, method_missing, #move, #unique
Constructor Details
This class inherits a constructor from QTest::Base
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/qtest/module.rb', line 3 def id @id end |
#module ⇒ Object
Returns the value of attribute module.
3 4 5 |
# File 'lib/qtest/module.rb', line 3 def module @module end |
#project ⇒ Object
Returns the value of attribute project.
3 4 5 |
# File 'lib/qtest/module.rb', line 3 def project @project end |
Instance Method Details
#child_module(opts = {}) ⇒ QTest::Module
Get a specific child Module under the Module.
10 11 12 13 14 15 |
# File 'lib/qtest/module.rb', line 10 def child_module(opts = {}) unique(QTest::Module, project: @project.id, module: @id, id: opts[:id]) end |
#child_modules(opts = {}) ⇒ Array[QTest::Module]
Get all child Modules under the Module.
22 23 24 25 26 27 |
# File 'lib/qtest/module.rb', line 22 def child_modules(opts = {}) all(QTest::Module, project: @project.id, module: @id, search: opts[:search]) end |
#create_test_case(opts = {}) ⇒ QTest::TestCase
Create a Test Case under the Module.
46 47 48 49 50 51 |
# File 'lib/qtest/module.rb', line 46 def create_test_case(opts = {}) create(QTest::TestCase, project: @project.id, module: @id, attributes: opts) end |
#test_cases ⇒ Array[QTest::TestCase]
Get all Test Cases under the Module.
32 33 34 35 36 |
# File 'lib/qtest/module.rb', line 32 def test_cases all(QTest::TestCase, project: @project.id, module: @id) end |