Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix serialize Struct, now Struct is not a collection #135

Merged
merged 6 commits into from
Mar 11, 2019

Conversation

wildkain
Copy link
Contributor

@wildkain wildkain commented Feb 27, 2019

Correction of behavior during serialization Struct. Now Struct is perceived as a single object, not a collection.

spec/serializer_spec.rb Outdated Show resolved Hide resolved
spec/serializer_spec.rb Outdated Show resolved Hide resolved
spec/serializer_spec.rb Outdated Show resolved Hide resolved
spec/serializer_spec.rb Outdated Show resolved Hide resolved
spec/serializer_spec.rb Outdated Show resolved Hide resolved
Repository owner deleted a comment from 0exp Mar 5, 2019
Repository owner deleted a comment from 0exp Mar 5, 2019
describe 'serializing a single struct' do
let(:person) { TestStruct.new('John', 'Dow') }

it 'raise surrealize instead surrealize_collection with struct' do
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

everything seems good, but the example message is quite misleading: nothing is raised, we are just asserting that SurrealistHelper.collection? returns false for a single struct
I suggest something like specify 'a struct is not treated as a collection' do ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@nesaulov nesaulov merged commit 2ef3633 into nesaulov:master Mar 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants