Sha256: 9eb90aaccc017738c71105fb1445af5680feaeeeb671bf489a0d06255dc1ee59

Contents?: true

Size: 720 Bytes

Versions: 2

Compression:

Stored size: 720 Bytes

Contents

# encoding: utf-8
require 'spec_helper'
require production_code

describe RakeNBake::AssistantBaker do
  describe '#log_step' do
    it 'puts the given message' do
      expect{described_class.log_step 'Foo'}.to output(/Foo/).to_stdout
    end

    it 'prints an attractive dot before the message' do
      expect{described_class.log_step 'Foo'}.to output(/● Foo/).to_stdout
    end
  end

  describe '#log_passed' do
    it 'puts the given message' do
      expect{described_class.log_passed 'Foo'}.to output(/Foo/).to_stdout
    end

    it 'prints the message in green' do
      expect{described_class.log_passed 'Foo'}.to output("#{Term::ANSIColor.green}Foo#{Term::ANSIColor.reset}\n").to_stdout
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rake-n-bake-1.1.1 spec/assistant_baker_spec.rb
rake-n-bake-1.1.0 spec/assistant_baker_spec.rb