Sha256: ca873c9a933901200789d11d667f62e3ef0e9a5511388b5082f879a220e1d315

Contents?: true

Size: 426 Bytes

Versions: 15

Compression:

Stored size: 426 Bytes

Contents

# frozen_string_literal: true

RSpec.describe ObjectExtensions do
  context 'when refining Object' do
    using ObjectExtensions

    describe '#integer?' do
      context 'for integers' do
        subject { rand(1..10) }
        it { expect(subject.integer?).to eq(true) }
      end
      context 'for non integers' do
        subject { rand }
        it { expect(subject.integer?).to eq(false) }
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
finapps_core-5.0.7 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.6 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.5 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.4 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.3 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.2 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.1 spec/core_extensions/object/is_integer_spec.rb
finapps_core-5.0.0 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.7 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.6 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.5 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.4 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.3 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.2 spec/core_extensions/object/is_integer_spec.rb
finapps_core-4.0.0 spec/core_extensions/object/is_integer_spec.rb