Skip to content

Instantly share code, notes, and snippets.

@evmorov
Last active May 3, 2016 06:40
Show Gist options
  • Save evmorov/8dc41eddfa81a7057551ab6c06c59772 to your computer and use it in GitHub Desktop.
Save evmorov/8dc41eddfa81a7057551ab6c06c59772 to your computer and use it in GitHub Desktop.
For the article at medium.com
class School
include HappyMapper
tag 'school'
has_one :id, String
has_one :name, String
end
let(:schools) { School.parse(xml) }
it do
id = schools.find { |school| school.name == 'Second school' }.id
expect(id).to eq('2')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment