Class: MountainBerryFields::Test::AlwaysFail

Inherits:
Object
  • Object
show all
Includes:
Strategy
Defined in:
lib/mountain_berry_fields/test/always_fail.rb

Overview

Red. Red. Refactor anyway, cuz fuck it.

Instance Attribute Summary

Attributes included from Strategy

#code_to_test

Instance Method Summary collapse

Methods included from Strategy

for, #initialize, register, registered?, unregister

Instance Method Details

#failure_messageObject



16
17
18
# File 'lib/mountain_berry_fields/test/always_fail.rb', line 16

def failure_message
  "THIS STRATEGY ALWAYS FAILS"
end

#pass?Boolean

Returns:

  • (Boolean)


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

def pass?
  eval code_to_test
ensure
  return false
end