Merge pull request #1192 from Br3nda/bw/three-pending-specs

Filled in the 3 pending planting specs
This commit is contained in:
Daniel O'Connor
2017-02-07 16:36:59 +10:30
committed by GitHub

View File

@@ -37,9 +37,18 @@ describe Planting do
end
describe '#planted?' do
it "should be false for future plantings"
it "should be false for never planted"
it "should be false for future plantings"
it "should be false for future plantings" do
planting = FactoryGirl.create :planting, planted_at: Time.zone.today + 1
expect(planting.planted?).to eq(false)
end
it "should be false for never planted" do
planting = FactoryGirl.create :planting, planted_at: nil
expect(planting.planted?).to eq(false)
end
it "should be true for past plantings" do
planting = FactoryGirl.create :planting, planted_at: Time.zone.today - 1
expect(planting.planted?).to eq(true)
end
end
describe '#percentage_grown' do