And we are green

This commit is contained in:
2013-12-12 06:37:42 +01:00
parent 391c8a7613
commit a0d4312238
4 changed files with 13 additions and 7 deletions
+10 -4
View File
@@ -7,28 +7,34 @@ describe :section do
describe :path do
describe :width do
it "should have zero width when initialized" do
Section.new.width.should be_zero
it "should have 20 width when initialized" do
Section.new.width.should == 20
end
it "should have new width when it is defined using a setter" do
@section.width = 3.2
@section.width.should == 3.2
end
it "should persist width property through database" do
@section.width = 3.2
@section.save
@reloaded_section = Section.find(@section.id)
@reloaded_section.width.should == 3.2
end
end
describe :height do
it "should have zero height when initialized" do
Section.new.height.should be_zero
it "should have 30 height when initialized" do
Section.new.height.should == 30
end
it "should have new height when it is defined using a setter" do
@section.height = 3.2
@section.height.should == 3.2
end
it "should persist height property through database" do
@section.height = 3.2
@section.save