mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-18 21:56:55 -04:00
Stringify gardens as their names.
This commit is contained in:
@@ -27,7 +27,10 @@ class Garden < ActiveRecord::Base
|
||||
end
|
||||
|
||||
return unique_plantings[0..3]
|
||||
end
|
||||
|
||||
def to_s
|
||||
name
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -18,6 +18,10 @@ describe Garden do
|
||||
@garden.owner.should be_an_instance_of Member
|
||||
end
|
||||
|
||||
it "should stringify as its name" do
|
||||
@garden.to_s.should == @garden.name
|
||||
end
|
||||
|
||||
context "featured plantings" do
|
||||
before :each do
|
||||
@tomato = FactoryGirl.create(:tomato)
|
||||
|
||||
Reference in New Issue
Block a user