Sha256: 9c592106d1b159e34f37ff7d9b1a29f51df64b46008aafbc754c9728a6f2c120

Contents?: true

Size: 427 Bytes

Versions: 6

Compression:

Stored size: 427 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 { 1 + rand(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

6 entries across 6 versions & 1 rubygems

Version Path
finapps_core-3.0.6 spec/core_extensions/object/is_integer_spec.rb
finapps_core-3.0.5 spec/core_extensions/object/is_integer_spec.rb
finapps_core-3.0.3 spec/core_extensions/object/is_integer_spec.rb
finapps_core-3.0.1 spec/core_extensions/object/is_integer_spec.rb
finapps_core-2.1.2 spec/core_extensions/object/is_integer_spec.rb
finapps_core-2.1.1 spec/core_extensions/object/is_integer_spec.rb