when write rspec tests, name describe blocks hash or period instance , class methods.
describe "#do_stuff" "does instance stuff" thing = thing.new thing.do_stuff expect(thing.stuff_done?).to eq(true) end end describe ".do_more_stuff" "does class stuff" thing.do_more_stuff expect(thing.more_stuff_done?).to eq(true) end end is there equivalent attributes? need test attribute default values , attributes have special behavior because of custom readers.
Comments
Post a Comment