Class: Res::Mappings

Inherits:
Object
  • Object
show all
Defined in:
lib/res/mappings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type) ⇒ Mappings

Returns a new instance of Mappings.



6
7
8
9
# File 'lib/res/mappings.rb', line 6

def initialize(type)
  @type = type
  set_type
end

Instance Attribute Details

#caseObject

Returns the value of attribute case.



4
5
6
# File 'lib/res/mappings.rb', line 4

def case
  @case
end

#contextObject

Returns the value of attribute context.



4
5
6
# File 'lib/res/mappings.rb', line 4

def context
  @context
end

#typeObject

Returns the value of attribute type.



4
5
6
# File 'lib/res/mappings.rb', line 4

def type
  @type
end

Instance Method Details

#set_typeObject



11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/res/mappings.rb', line 11

def set_type
  case @type
  when "Junit"
    @context = ["JUnit::testsuite", "JUnit::testsuites"]
    @case = ["JUnit::testcase"]      
  when "Cucumber"
    @context = ["Cucumber::Feature", "Cucumber::ScenarioOutline"]
    @case = ["Cucumber::Scenario"]
  when "Rspec"
    @context = ["Rspec::Describe"]
    @case = ["Rspec::Test"]
  end
end