File: unordered_spec.rb

package info (click to toggle)
ruby-tdiff 0.3.3-1.1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 172 kB
  • sloc: ruby: 266; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 546 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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