Sha256: 502a522ea4492515083bc8f1f2b4c838d7870ba2e362c79d27727bf4b0bae306

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

require 'spec_helper'
require 'tdiff_examples'

require 'tdiff/unordered'

describe TDiff::Unordered do
  include Helpers::Trees

  it "should include TDiff when included" do
    base = Class.new do
      include TDiff::Unordered
    end

    expect(base).to include(TDiff)
  end

  it_should_behave_like 'TDiff', :tdiff_unordered

  it "should not detect when the order of children has changed" do
    changes = @tree.tdiff_unordered(@changed_order).select do |change,node|
      change != ' '
    end

    expect(changes).to be_empty
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
tdiff-0.4.0 spec/unordered_spec.rb
tdiff-0.3.4 spec/unordered_spec.rb