Question: I'm trying to raise 2 exceptions when one of my variables is bigger than 13 or less than 1
also I want to raise exception if the type of my **card** is not one of the defined one.
this is my code :

```
require "../lib/suit"
class Card
    attr_reader :suit,:number
 def initialize(suit,number)
     raise "CardNumberNotValid" if 1>number>13
     raise "SuitNotValid" if suit!=Suit::CLUB or suit!=Suit::HEART or suit!=Suit::DIAMOND or suit!=Suit::SPADE
     @suit=suit
     @number=number
 end
end

```

and this is my test:

```
require "rspec"
require "../lib/suit"
require "../lib/card"

describe Card do

  it "should check if card number is between 1 and 13" do
    expect{Card.new(Suit::CLUB,14)}.to raise_error("CardNumberNotValid")
  end
end

```

The result is below :

> 
> Failures:
> 
> 
> 1) Card should check if card number is between 1 and 13
>  Failure/Error: expect{Card.new(Suit::CLUB,14)}.to raise\_error("CardNumberNotValid")
>  expected Exception with "CardNumberNotValid", got #' for false:FalseClass>
>  # ./card\_spec.rb:8
> 
> 
> Finished in 0.00064 seconds 1 example, 1 failure
> 
> 
> Failed examples:
> 
> 
> rspec ./card\_spec.rb:7 # Card should check if card number is between 1
>  and 13
> 
> 
> 

can you please help ?

Answer: 
```
1>number>13

```

Does not work in Ruby. Use something like:

```
number.between?(1, 13)

```
If you raise an error in ruby without a type:

```
raise "My pink pig"

```

ruby is going to raise a RuntimeError with "My pink pig" as a message (assuming that you aren't already processing an error, in which case the new error will have the same type).

You should probably be expecting your error differently:

```
expect{Card.new(Suit::CLUB,14)}.to raise_error(RuntimeError, "CardNumberNotValid")

```