Last active
July 8, 2016 07:19
-
-
Save lesniakania/21b5454655d37761d6293e64f0c93314 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
class Garden | |
def initialize(gardener) | |
gardener.set_workday(Workday.new) | |
gardener.set_boots(BootsWithMassiveStaticInitBlock.new) | |
@gardener = gardener | |
end | |
end | |
class Gardener | |
def set_workday(workday) | |
@workday = workday | |
end | |
def set_boots(boots) | |
@boots = boots | |
end | |
def working? | |
# ... | |
end | |
end | |
describe Gardener do | |
let(:gardener) { Gardener.new } | |
let(:garden) { Garden.new(gardener) } | |
describe "#working?" do | |
before { AphidPlague.new(garden).infect } | |
it { expect(gardener.working?).to be true } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment