Last active
July 8, 2016 07:20
-
-
Save lesniakania/e642c36ea81073e316d22b367fe94870 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 = gardener | |
end | |
end | |
class Gardener | |
def initialize(workday, boots) | |
@workday = workday | |
@boots = boots | |
end | |
def working? | |
# ... | |
end | |
end | |
describe Gardener do | |
let(:gardener) { Gardener.new(workday, boots) } | |
let(:garden) { Garden.new(gardener) } | |
let(:workday) { instance_double('Workday') } | |
let(:boots) { instance_double('BootsWithMassiveStaticInitBlock') } | |
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