Skip to content

Instantly share code, notes, and snippets.

@jlcarrascof
Created October 11, 2023 03:11
Show Gist options
  • Save jlcarrascof/7b3d81ed0f3b75f4e9dc885c660a436a to your computer and use it in GitHub Desktop.
Save jlcarrascof/7b3d81ed0f3b75f4e9dc885c660a436a to your computer and use it in GitHub Desktop.
Requirement 2 - Decorator test
require_relative '../lib/models/decorator'
require_relative '../lib/models/persons'
describe 'Tests For Decorator class:' do
# we need to provide data for the parameters
person = Person.new('harry Potter', 20, parent_permission: true)
# created instance of decorator class
decorator = Decorator.new(person)
# test the correct_name method
context 'correct_name method' do
it 'should return the name: harry Potter' do
expect(decorator.correct_name).to eq('harryPotter')
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment