Sha256: 9605e239d74c12f4c6d501342c372120120569f4c5c2178f23fcb6517e326d74

Contents?: true

Size: 1.13 KB

Versions: 11

Compression:

Stored size: 1.13 KB

Contents

require File.dirname(__FILE__) + '/helper'

describe Mercurial::Commit do
  
  before do
    @repository = Mercurial::Repository.open(Fixtures.test_repo)
    @commit = @repository.commits.by_hash_id('54d96f4b1a26')
    @files = @commit.changed_files
  end
  
  it "should indicate modified file" do
    file = @files[0]
    file.initial_name.must_equal nil
    file.name.must_equal 'README.markup'
    file.mode.must_equal :edit
  end
  
  it "should indicate added file" do
    file = @files[1]
    file.initial_name.must_equal nil
    file.name.must_equal 'superman.txt'
    file.mode.must_equal :add
  end
  
  it "should indicate deleted file" do
    file = @files[2]
    file.initial_name.must_equal nil
    file.name.must_equal 'Rakefile2'
    file.mode.must_equal :delete
  end
  
  it "should indicate copied file" do
    file = @files[3]
    file.initial_name.must_equal 'LICENSE3.txt'
    file.name.must_equal 'LICENSE4.txt'
    file.mode.must_equal :copy
  end

  it "should indicate moved file" do
    file = @files[4]
    file.initial_name.must_equal 'Rakefile'
    file.name.must_equal 'Rakefile3'
    file.mode.must_equal :move
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
mercurial-ruby-0.7.12 test/test_changed_file.rb
mercurial-ruby-0.7.11 test/test_changed_file.rb
mercurial-ruby-0.7.10 test/test_changed_file.rb
mercurial-ruby-0.7.9 test/test_changed_file.rb
mercurial-ruby-0.7.8 test/test_changed_file.rb
mercurial-ruby-0.7.7 test/test_changed_file.rb
mercurial-ruby-0.7.6 test/test_changed_file.rb
mercurial-ruby-0.7.5 test/test_changed_file.rb
mercurial-ruby-0.7.4 test/test_changed_file.rb
mercurial-ruby-0.7.3 test/test_changed_file.rb
mercurial-ruby-0.7.2 test/test_changed_file.rb