require 'rspectacular'

describe ProgressBar::Format::Molecule do
  describe '#new' do
    before { @molecule = ProgressBar::Format::Molecule.new('t') }

    it 'sets the key when initialized' do
      expect(@molecule.key).to eql 't'
    end

    it 'sets the method name when initialized' do
      expect(@molecule.method_name).to eql [:title_comp, :title]
    end
  end

  describe '#bar_molecule?' do
    it "is true if the molecule's key is a representation of the progress bar graphic" do
      molecule = ProgressBar::Format::Molecule.new('B')
      expect(molecule).to be_bar_molecule
    end
  end
end

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

Update tests for 'Molecule' to the new format
Refactor: Update tests for 'Molecule' to the new format

--------------------------------------------------------------------------------
Branch:        refactor/massive-update
Signed-off-by: Jeff Felchner <8a84c204e2d4c387d61d20f7892a2bbbf0bc8ae8@thekompanee.com>
