Sha256: 7d9bf51c712408fd10d1634ba58162e90b0cc36a23167c83add3f2137cb2ed37
Contents?: true
Size: 625 Bytes
Versions: 1
Compression:
Stored size: 625 Bytes
Contents
RSpec.describe ChgkRating::Utils::Transformations do specify '.to_boolean' do expect(described_class.send(:to_boolean).call('1')).to eq(true) expect(described_class.send(:to_boolean).call('0')).to eq(false) end specify '.to_binary_boolean' do expect(described_class.send(:to_binary_boolean).call(true)).to eq('1') expect(described_class.send(:to_binary_boolean).call(false)).to eq('0') end specify '.to_star' do expect(described_class.send(:to_star, :to_i).call('1')).to eq(1) expect(described_class.send(:to_star, :to_sym, true).call(%w(one two apple))).to eq(%i(one two apple)) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
chgk_rating-1.0.0.rc1 | spec/lib/chgk_rating/utils/transformations_spec.rb |