Module: LineByLine::Assertions

Defined in:
lib/linebyline.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(into) ⇒ Object



84
85
86
# File 'lib/linebyline.rb', line 84

def self.included(into)
  into.send(:include, LineByLine)
end

Instance Method Details

#assert_same_buffer(ref_buffer, actual_buffer, message = "The line should be identical but was not") ⇒ Object



88
89
90
91
92
93
94
95
# File 'lib/linebyline.rb', line 88

def assert_same_buffer(ref_buffer, actual_buffer, message = "The line should be identical but was not")
  begin
    compare_buffers! ref_buffer, actual_buffer
    assert true
  rescue NotSame => e
    flunk [message, e.message].join("\n")
  end
end