Guest User

Untitled

a guest
Feb 21st, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. require File.dirname(__FILE__) + "/spec_helper"
  2.  
  3. include ZodiacHelper
  4.  
  5. describe "Zodiac" do
  6. before :each do
  7. @date = Time.utc(2000, "jun", 12)
  8. end
  9.  
  10. it "returns the zodiac sign for a given Time" do
  11. zodiac_sign_for(@date).should == "Gemini"
  12. end
  13.  
  14. it "returns the zodiac sign for a given number" do
  15. zodiac_sign_for(612).should == "Gemini"
  16. end
  17.  
  18. it "receives a number that represents a month and day" do
  19. zodiac_sign_for(612).should == zodiac_sign_for(@date)
  20. end
  21.  
  22. it "raises if the date's invalid" do
  23. lambda {zodiac_sign_for(9999)}.should raise_error(RuntimeError)
  24. lambda {zodiac_sign_for("9999")}.should raise_error(RuntimeError)
  25. end
  26. end
Add Comment
Please, Sign In to add comment