We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2bf2c1a commit 693180fCopy full SHA for 693180f
spec/grape/validations/types/primitive_coercer_spec.rb
@@ -8,6 +8,14 @@
8
subject { described_class.new(type, strict) }
9
10
describe '#call' do
11
+ context 'BigDecimal' do
12
+ let(:type) { BigDecimal }
13
+
14
+ it 'coerces to BigDecimal' do
15
+ expect(subject.call(5)).to eq(BigDecimal(5))
16
+ end
17
18
19
context 'Boolean' do
20
let(:type) { Grape::API::Boolean }
21
@@ -40,14 +48,6 @@
40
48
end
41
49
42
50
43
- context 'BigDecimal' do
44
- let(:type) { BigDecimal }
45
-
46
- it 'coerces to BigDecimal' do
47
- expect(subject.call(5)).to eq(BigDecimal(5))
- end
51
context 'the strict mode' do
52
let(:strict) { true }
53
0 commit comments