title: Expected Exception but nothing was raised using Rspec. Trying to raise_error when variable is empty
body: <p>I am trying to pass this last test, trying raise an exception I can't make it work. Is there something I'm not seeing? I've been looking at it for hours and looking for an answer, thank you in advance to anyone who might respond to this.</p>
  <p>Error message :</p>
  <p>Failure/Error: expect{birthday_list.show_birthdays}.to raise_error{'No birthdays avalible!'}
  expected Exception but nothing was raised</p>
  <p>Tests:</p>
  <pre><code>
  
  describe BirthdayList do
  birthdays = @birthdays
  birthday_list = BirthdayList.new
  
  
  describe '#add' do
    it 'adds a birthday to the list' do
      expect(birthday_list.add('name','date')).to eq   ([{:dates=&gt;&quot;date&quot;, :names=&gt;&quot;name&quot;}])
    end
  end
  
  describe '#show_birthdays' do
    it 'throws an error when there is no birthdays' do
    @birthdays = []
      expect{birthday_list.show_birthdays}.to raise_error{'No birthdays avalible!'}
    end
  
    it 'prints all birthdays' do
  
  
      expect(birthday_list.show_birthdays).to eq &quot;name, date\n&quot;
    end
  end
  
  end
  </code></pre>
  <p>And Code</p>
  <pre><code>
  class BirthdayList
    def initialize
      @birthdays = []
    end
  
    def add name,date
      birthday = {:names =&gt; name, :dates =&gt; date }
      @birthdays.push(birthday)
    end
  
   def show_birthdays
     raise 'No birthdays avalible!' unless @birthdays
     
     list_to_print = ''
  
     @birthdays.each do |b|
       print &quot;#{b[:names]}, #{b[:dates]} \n&quot;
     end
  
     @birthdays.each do |b|
       list_to_print += &quot;#{b[:names]}, #{b[:dates]}\n&quot;
     end
  
     list_to_print
  end
  
   end
  </code></pre>