Sha256: baba6b8a0854f7f968d48250b1a12ba7d6e2f41db8a7df8353fc979189dfb4e7
Contents?: true
Size: 495 Bytes
Versions: 7
Compression:
Stored size: 495 Bytes
Contents
# frozen_string_literal: true RSpec.describe Necromancer::BooleanConverters::IntegerToBooleanConverter, '.call' do subject(:converter) { described_class.new } it "converts 1 to true value" do expect(converter.call(1)).to eq(true) end it "converts 0 to false value" do expect(converter.call(0)).to eq(false) end it "fails to convert in strict mode" do expect { converter.call('1', strict: true) }.to raise_error(Necromancer::ConversionTypeError) end end
Version data entries
7 entries across 7 versions & 2 rubygems