@@ -55,8 +55,8 @@ RSpec.describe UsersController, type: :controller do
5555 id: RSpec ::JsonApi ::Types ::UUID ,
5656 name: String ,
5757 age: Integer ,
58- favouriteColorHex : /^\# ([a-fA-F] |[0-9] ) {3,6} $/ ,
59- number: -> { { type: Integer , min: 10 , max: 20 , lambda: -> (actual) { actual. even? } } }
58+ favoriteColorHex : /^\# ([a-fA-F] |[0-9] ) {3,6} $/ ,
59+ number: -> { { type: Integer , min: 10 , max: 20 , lambda: lambda ( & : even?) } }
6060 }]
6161 end
6262
@@ -150,7 +150,7 @@ The gem offers variety of possible matching methods.
150150
151151 Failure Example:
152152 ``` ruby
153- let(:expected ) do
153+ let(:expected_schema ) do
154154 {
155155 id: RSpec ::JsonApi ::Types ::UUID ,
156156 name: String ,
@@ -168,7 +168,7 @@ The gem offers variety of possible matching methods.
168168
169169 Success Example:
170170 ` ` ` ruby
171- let(:expected ) do
171+ let(:expected_schema ) do
172172 {
173173 id: RSpec::JsonApi::Types::UUID,
174174 name: String,
@@ -192,7 +192,7 @@ let(:expected_schema) do
192192 id: "e0067346-4d24-4aa6-b303-f927a410a001",
193193 name: "John",
194194 age: 24,
195- favouriteColorHex : "#FF5733"
195+ favoriteColorHex : "#FF5733"
196196 }
197197end
198198` ` `
236236` ` `
237237
238238# ## Proc match
239- Proc match allows to customize schema accoring needs using lambda shorthand notation ` ->`
239+ Proc match allows to customize schema according needs using lambda shorthand notation ` ->`
240240
241241Supported options:
242242- # ### type
289289` ` `
290290- # ### lambda
291291` ` ` ruby
292- let(:expected ) do
292+ let(:expected_schema ) do
293293 {
294- number: -> { { lambda: ->(actual) { actual. even? } } }
294+ number: -> { { lambda: lambda(&: even?) } }
295295 }
296296end
297297` ` `
0 commit comments