Sha256: bb862e9ae4268ddf2aa84a5d67420b0a9389c4abf89bfe118ddd1726f6dfcf86

Contents?: true

Size: 703 Bytes

Versions: 23

Compression:

Stored size: 703 Bytes

Contents

require 'spec_helper'

describe Maid::NumericExtensions::Time, '#since?' do
  it 'tells you that 1 week ago happened after 2 weeks ago' do
    expect(1.week.since?(2.weeks.ago)).to be(true)
  end

  it 'tells you that 2 weeks ago was not after 1 week ago' do
    expect(2.week.since?(1.weeks.ago)).to be(false)
  end
end

describe Maid::NumericExtensions::SizeToKb do
  it 'tells you that 1 megabyte equals 1024 kilobytes' do
    expect(1.megabyte).to eq(1024.kilobytes)
  end

  it 'tells you that 1 gigabyte equals 1024 megabytes' do
    expect(1.gigabyte).to eq(1024.megabytes)
  end
  
  it 'tells you that 1 terabyte equals 1024 gigabytes' do
    expect(1.terabyte).to eq(1024.gigabytes)
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
maid-0.10.0.pre.alpha.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.9.0.alpha.2 spec/lib/maid/numeric_extensions_spec.rb
maid-0.9.0.alpha.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.8.0.alpha.4 spec/lib/maid/numeric_extensions_spec.rb
maid-0.8.0.alpha.3 spec/lib/maid/numeric_extensions_spec.rb
maid-0.8.0.alpha.2 spec/lib/maid/numeric_extensions_spec.rb
maid-0.8.0.alpha.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.7.0 spec/lib/maid/numeric_extensions_spec.rb
maid-0.7.0.beta.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.7.0.alpha.4 spec/lib/maid/numeric_extensions_spec.rb
maid-0.7.0.alpha.2 spec/lib/maid/numeric_extensions_spec.rb
maid-0.7.0.alpha.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.1.alpha.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.0 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.0.beta.2 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.0.beta.1 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.0.alpha.6 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.0.alpha.5 spec/lib/maid/numeric_extensions_spec.rb
maid-0.6.0.alpha.4 spec/lib/maid/numeric_extensions_spec.rb