Logo: Relish

  1. Sign in

Project: Ygg

Accessors to loaded resources (object)

In order to conveniently access loadad resources
As a Ygg user
I want to setup useful accessors

Scenarios
Getting all objects of type User and Account
Given
the class User has the field :name
And
the class Account has the field :amount
And
the class Account has the field :currency
And
the file "emulations/samples/user.ygg" contains:
- !ruby/object:YggDemo::User 
  name: Xavier Via
- !ruby/object:YggDemo::Account 
  amount: 45
  currency: us
When
I load the file and request for objects of type User
Then
I should get an user named "Xavier Via"
The User is a Record
Given
the class User has the field :name
And
extends Record
And
I have the file "emulations/samples/user.ygg"
When
I load the file and ask User for records
Then
I should get an user named "Xavier Via"

Last published over 5 years ago by xaviervia.