Class: MountainBerryFields::Test

Inherits:
Object
  • Object
show all
Defined in:
lib/mountain_berry_fields/test.rb,
lib/mountain_berry_fields/test/always_fail.rb,
lib/mountain_berry_fields/test/always_pass.rb

Overview

Data structure to store the shit passed to the test method

Defined Under Namespace

Modules: Strategy Classes: AlwaysFail, AlwaysPass, RubySyntaxChecker

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options) ⇒ Test

Returns a new instance of Test.


10
11
12
# File 'lib/mountain_berry_fields/test.rb', line 10

def initialize(name, options)
  self.name, self.options = name, options
end

Instance Attribute Details

#nameObject

Returns the value of attribute name


8
9
10
# File 'lib/mountain_berry_fields/test.rb', line 8

def name
  @name
end

#optionsObject

Returns the value of attribute options


8
9
10
# File 'lib/mountain_berry_fields/test.rb', line 8

def options
  @options
end

Instance Method Details

#codeObject


18
19
20
# File 'lib/mountain_berry_fields/test.rb', line 18

def code
  options[:code]
end

#strategyObject


14
15
16
# File 'lib/mountain_berry_fields/test.rb', line 14

def strategy
  options[:with]
end