Sha256: 6d46cef43d9852fa9437ec931bda9105708b9bf18bd1a43bef337a8b3c5f149a

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require 'method_log/method_commit'
require 'method_log/commit'
require 'method_log/source_file'
require 'method_log/method_definition'

describe MethodLog::MethodCommit do
  let(:commit) { MethodLog::Commit.new }
  let(:source_file) { MethodLog::SourceFile.new(path: '/path/to/source.rb', source: 'source') }
  let(:method_definition) { MethodLog::MethodDefinition.new(source_file: source_file, lines: 5..7) }
  let(:method_commit) {
    MethodLog::MethodCommit.new(commit: commit, method_definition: method_definition)
  }
  let(:method_commit_with_same_commit_and_method_definition) {
    MethodLog::MethodCommit.new(commit: commit, method_definition: method_definition)
  }

  it 'is equal to another method commit with same commit and method definition' do
    expect(method_commit).to eq(method_commit_with_same_commit_and_method_definition)
  end

  it 'has same hash as another method commit with same commit and method definition' do
    expect(method_commit.hash).to eq(method_commit_with_same_commit_and_method_definition.hash)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
method_log-0.0.1 spec/method_commit_spec.rb