Skip to content

Instantly share code, notes, and snippets.

@ameseee
Last active November 16, 2023 20:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 23 You must be signed in to fork a gist
  • Save ameseee/037a9d2f9bfcd7beee85b528785c0c1c to your computer and use it in GitHub Desktop.
Save ameseee/037a9d2f9bfcd7beee85b528785c0c1c to your computer and use it in GitHub Desktop.
# mermaid_spec.rb
require 'rspec'
require './lib/mermaid'

describe Mermaid do
  it 'is an instance of mermaid' do
    mermaid = Mermaid.new('Sereia')
    expect(mermaid).to be_a Mermaid
  end

  it 'has a name' do
    mermaid = Mermaid.new('Sereia')
    expect(mermaid.name).to eq 'Sereia'
  end
  
  it 'has an age' do
    mermaid = Mermaid.new('Sereia')
    expect(mermaid.age).to eq 22
  end
  
  it 'has can get older' do
    mermaid = Mermaid.new('Sereia')
    mermaid.get_older
    expect(mermaid.age).to eq 23
  end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment