Sha256: 692af923a53d1748784dc97c6b3ead2548208badce3ae188bf9c33bc9f42de97

Contents?: true

Size: 535 Bytes

Versions: 8

Compression:

Stored size: 535 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Mutant::Differ, '.colorize_line' do
  let(:object) { described_class }

  subject { object.colorize_line(line) }

  context 'line beginning with "+"' do
    let(:line) { '+line' }

    it { should eql(Mutant::Color::GREEN.format(line)) }
  end

  context 'line beginning with "-"' do
    let(:line) { '-line' }

    it { should eql(Mutant::Color::RED.format(line)) }
  end

  context 'line beginning in other char' do
    let(:line) { ' line' }

    it { should eql(line) }
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
mutant-0.3.1 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.rc5 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.rc4 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.rc3 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.rc2 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.rc1 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta22 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb