Sha256: aa8fd07ba45825d63887fff8b8ec8ac7f423a6af86b2ded2feb155fa95bde3aa

Contents?: true

Size: 641 Bytes

Versions: 3

Compression:

Stored size: 641 Bytes

Contents

require 'rspectacular'
require 'ruby-progressbar/format/molecule'

class     ProgressBar
module    Format
describe  Molecule do
  it 'sets the key when initialized' do
    molecule = Molecule.new('t')

    expect(molecule.key).to eql 't'
  end

  it 'sets the method name when initialized' do
    molecule = Molecule.new('t')

    expect(molecule.method_name).to eql [:title_comp, :title]
  end

  it 'can retrieve the full key for itself' do
    molecule = Molecule.new('t')

    expect(molecule.full_key).to eql '%t'
  end

  it 'can determine if it is a bar molecule' do
    expect(Molecule.new('B')).to be_bar_molecule
  end
end
end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ruby-progressbar-1.7.5 spec/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.7.1 spec/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.7.0 spec/ruby-progressbar/format/molecule_spec.rb