Sha256: 2a73f43ee7ebfbe05dced15713100fe7b890e93c0e378ead159881e667a617ea

Contents?: true

Size: 516 Bytes

Versions: 8

Compression:

Stored size: 516 Bytes

Contents

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.0.beta21 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta20 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta19 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta18 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta17 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta16 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta15 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb
mutant-0.3.0.beta14 spec/unit/mutant/differ/class_methods/colorize_line_spec.rb