Sha256: 9bcc17e6f3a2aafb5c50d99e01737a51272231f43f675ed51769c55fa2b94076
Contents?: true
Size: 758 Bytes
Versions: 3
Compression:
Stored size: 758 Bytes
Contents
require 'spec_helper' require 'helpers/trees' require 'tdiff_examples' require 'tdiff/tdiff' describe TDiff do include Helpers::Trees it_should_behave_like 'TDiff', :tdiff it "should detect when the order of children has changed" do changes = @tree.tdiff(@changed_order).to_a changes.length.should == 5 changes[0][0].should == '-' changes[0][1].should == @tree.children[0] changes[1][0].should == ' ' changes[1][1].should == @tree.children[1] changes[2][0].should == '+' changes[2][1].should == @changed_order.children[1] changes[3][0].should == ' ' changes[3][1].should == @tree.children[1].children[0] changes[4][0].should == ' ' changes[4][1].should == @tree.children[1].children[1] end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tdiff-0.3.1 | spec/tdiff_spec.rb |
tdiff-0.3.0 | spec/tdiff_spec.rb |
tdiff-0.2.0 | spec/tdiff_spec.rb |