Created
November 19, 2008 06:28
-
-
Save febuiles/26436 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require File.dirname(__FILE__) + "/spec_helper" | |
| include ZodiacHelper | |
| describe "Zodiac" do | |
| before :each do | |
| @date = Time.utc(2000, "jun", 12) | |
| end | |
| it "returns the zodiac sign for a given Time" do | |
| zodiac_sign_for(@date).should == "Gemini" | |
| end | |
| it "returns the zodiac sign for a given number" do | |
| zodiac_sign_for(612).should == "Gemini" | |
| end | |
| it "receives a number that represents a month and day" do | |
| zodiac_sign_for(612).should == zodiac_sign_for(@date) | |
| end | |
| it "raises if the date's invalid" do | |
| lambda {zodiac_sign_for(9999)}.should raise_error(RuntimeError) | |
| lambda {zodiac_sign_for("9999")}.should raise_error(RuntimeError) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment