Sha256: cd047ce4d98eff4c640161059dc009a82064621c07977e0a0b4ce2adc04d5b52
Contents?: true
Size: 740 Bytes
Versions: 7
Compression:
Stored size: 740 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe Object do describe '#is_any?' do subject { 1 } it do expect(subject).to respond_to(:is_any?) end context 'when no argument is passed' do it do expect(subject.is_any?).to be_falsey end end context 'when passing the correct class as argument' do it do expect(subject.is_any?(subject.class)).to be_truthy end context 'along any other class' do it do expect(subject.is_any?(Symbol, subject.class)).to be_truthy end end end context 'when passing the wrong class' do it do expect(subject.is_any?(Symbol)).to be_falsey end end end end
Version data entries
7 entries across 7 versions & 1 rubygems