spec/dslh_spec.rb in dslh-0.4.2 vs spec/dslh_spec.rb in dslh-0.4.3
- old
+ new
@@ -3096,41 +3096,41 @@
"employees":
type: seq
sequence:
- type: map
mapping:
- "_id":
- type: str
- required: yes
- "code":
- type: int
- required: yes
- "email":
- type: str
+ "_id":
+ type: str
+ required: yes
+ "code":
+ type: int
+ required: yes
+ "email":
+ type: str
"employees2":
type: seq
sequence:
- type: map
mapping:
- "_id":
- type: str
- required: yes
- "code":
- type: int
- required: yes
- "email":
- type: str
+ "_id":
+ type: str
+ required: yes
+ "code":
+ type: int
+ required: yes
+ "email":
+ type: str
EOS
end
let(:expected_errmsg) do
<<-EOS.chomp
-[/employees/0/_id] '123': not a string.
-[/employees/1/email] '100': not a string.
-[/employees2/0] key 'code:' is required.
-[/employees2/0/code1] key 'code1:' is undefined.
-[/employees2/0/email1] key 'email1:' is undefined.
-[/employees3] key 'employees3:' is undefined.
+[/employees/123/_id] '123': not a string.
+[/employees/bar/email] '100': not a string.
+[/employees2/foo2] key 'code:' is required.
+[/employees2/foo2/code1] key 'code1:' is undefined.
+[/employees2/foo2/email1] key 'email1:' is undefined.
+[/employees3/bar2] key 'employees3:' is undefined.
EOS
end
it 'has no error' do
h = Dslh.eval(:schema => schema, :root_identify => true) do