Class: RSpec::Support::HunkGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/support/hunk_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(actual, expected) ⇒ HunkGenerator

Returns a new instance of HunkGenerator.



10
11
12
13
# File 'lib/rspec/support/hunk_generator.rb', line 10

def initialize(actual, expected)
  @actual = actual
  @expected = expected
end

Instance Method Details

#hunksObject



15
16
17
18
19
20
# File 'lib/rspec/support/hunk_generator.rb', line 15

def hunks
  @file_length_difference = 0
  @hunks ||= diffs.map do |piece|
    build_hunk(piece)
  end
end