Created
June 30, 2009 18:12
-
-
Save e1senh0rn/138305 to your computer and use it in GitHub Desktop.
This file contains 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' | |
module PropertySpecHelper | |
def valid_property_attributes | |
{ | |
:name => "a_property", | |
:presentation => "A Property" | |
} | |
end | |
end | |
describe Property do | |
include PropertySpecHelper | |
it { should validate_presence_of(:name) } | |
it { should validate_presence_of(:presentation) } | |
before(:each) do | |
@property = Property.new | |
end | |
it "should not be valid when empty" do | |
@property.should_not be_valid | |
end | |
it "should be valid when having correct information" do | |
@property.attributes = valid_property_attributes | |
@property.should be_valid | |
end | |
it "should find all by prototype" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment