Sha256: 0d2ac483f31ea38369ea1654377c97f6651359af1dc9eb8d3d0a79b22893cdc2

Contents?: true

Size: 609 Bytes

Versions: 14

Compression:

Stored size: 609 Bytes

Contents

require 'spec_helper'

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

    it 'sets the key when initialized' do
      @molecule.key.should eql 'e'
    end

    it 'sets the method name when initialized' do
      @molecule.method_name.should eql :estimated_time_with_unknown_oob
    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')
      molecule.should be_bar_molecule
    end
  end
end

Version data entries

14 entries across 14 versions & 2 rubygems

Version Path
ruby-progressbar-1.4.2 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.4.1 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.4.0 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.3.2 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.3.1 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.3.0 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.2.0 spec/lib/ruby-progressbar/format/molecule_spec.rb
ruby-progressbar-1.1.1 spec/progress_bar/format/molecule_spec.rb
ruby-progressbar-1.1.0 spec/progress_bar/format/molecule_spec.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/ruby-progressbar-1.0.2/spec/progress_bar/format/molecule_spec.rb
ruby-progressbar-1.0.2 spec/progress_bar/format/molecule_spec.rb
ruby-progressbar-1.0.1 spec/progress_bar/format/molecule_spec.rb
ruby-progressbar-1.0.0 spec/progress_bar/format/molecule_spec.rb
ruby-progressbar-1.0.0rc1 spec/progress_bar/format/molecule_spec.rb