Skip to content

Instantly share code, notes, and snippets.

@corroded
Created April 7, 2018 21:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save corroded/9d6074ca762c28750d1afccaf4f43a1e to your computer and use it in GitHub Desktop.
Save corroded/9d6074ca762c28750d1afccaf4f43a1e to your computer and use it in GitHub Desktop.
Covetous example
describe 'when receiving the hero details' do
it 'should have the top level keys as methods' do
top_level_keys = %w{id name gender level paragonLevel hardcore skills items followers stats kills progress dead last-updated}
top_level_keys.each do |tl_key|
@my_hero.send(tl_key).must_equal @my_hero.response[tl_key.camelize(:lower)]
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment