Sha256: 4f30176d68729e6170e340d617633b20273c8d62f270fa2fbece44f74c4ea21e

Contents?: true

Size: 458 Bytes

Versions: 9

Compression:

Stored size: 458 Bytes

Contents

require 'spec_helper'

describe 'Rearview::Ext::Numeric' do
  context '#bytes_to_kilobytes' do
    it "should convert bytes to kilobytes" do
      expect(1024.bytes_to_kilobytes).to eq(1)
      expect(10485760.bytes_to_kilobytes).to eq(10240)
    end
  end
  context '#bytes_to_megabytes' do
    it "should convert bytes to megabytes" do
      expect(1048576.bytes_to_megabytes).to eq(1)
      expect(10485760.bytes_to_megabytes).to eq(10)
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.2.2.rc.2-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.2.2.rc.1-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.2.1-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.2.0-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.1.2-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.1.1-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.1.0-jruby spec/lib/rearview/ext/numeric_spec.rb
rearview-1.0.3.rc.4-jruby spec/lib/rearview/ext/numeric_spec.rb