lib/api-tester/definition/fields/boolean_field.rb in api-tester-1.0.0 vs lib/api-tester/definition/fields/boolean_field.rb in api-tester-1.1.1

- old
+ new

@@ -1,20 +1,23 @@ +# frozen_string_literal: true + require 'api-tester/definition/fields/field' module ApiTester + # Class for defining booleans in contract class BooleanField < Field - def initialize name:, default_value: true - super name: name, default_value: default_value + def initialize(name:, default_value: true, required: false) + super name: name, default_value: default_value, required: required end def negative_boundary_values super + - [ - "string", - 123, - 0, - 1, - {} - ] + [ + 'string', + 123, + 0, + 1, + {} + ] end end end