Created
August 4, 2011 00:18
-
-
Save dreamr/1124220 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 'spec_helper' | |
describe Layout do | |
describe "#generate(rafter_spacing, rafter_x_width, | |
mounting_length, mounting_width)" do | |
before(:each) do | |
@topic = Factory.build(:layout).generate | |
end | |
it "should return a mounting surface divs" do | |
@topic.scan(/<div class='mounting_surface'/).count.should eql(1) | |
end | |
it "should return a mountable area divs" do | |
@topic.scan(/<div class='mountable_area'/).count.should eql(1) | |
end | |
it "should return 24 rafter divs" do | |
@topic.scan(/<div class='rafter'/).count.should eql(24) | |
end | |
it "should return 48 panel divs" do | |
@topic.scan(/<div class='panel'/).count.should eql(48) | |
end | |
it "should return 168 foot divs" do | |
@topic.scan(/<div class='leveling_foot'/).count.should eql(168) | |
end | |
it "should return 35 interlock divs" do | |
@topic.scan(/<div class='interlock'/).count.should eql(35) | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment