-
-
Save paulsonkoly/1792c02b6128817da44f07d916ee9c37 to your computer and use it in GitHub Desktop.
pokemon
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe '#reload' do | |
# Attributes | |
let(:id) { 25 } | |
let(:name) { 'Pikachu' } | |
let(:new_name) { 'Pika' } | |
let(:pokemon) { Pokemon.find(id) } | |
it 'returns an object with the original attributes' do | |
pokemon.name = new_name | |
expect(pokemon.reload).to have_attributes(name: name) | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment