Module: FailConditionally

Included in:
GoldmasterTestCase
Defined in:
lib/goldmaster_test_case.rb

Instance Method Summary collapse

Instance Method Details

#fail_if_write_still_enabled(cs, writer, data, name) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/goldmaster_test_case.rb', line 6

def fail_if_write_still_enabled(cs, writer, data, name)
  if cs.method_defined?(:write_goldmaster!)
    writer.write(data, name)

    raise RuntimeError.new("Disable write to goldmaster (erase write_goldmaster! in #{cs})")
  end
end