Sha256: a444e2afeb436361236022e5ff5a93072203dfa4529fd7bd5208731337f81bd9
Contents?: true
Size: 834 Bytes
Versions: 1
Compression:
Stored size: 834 Bytes
Contents
module Gendered describe NameList do subject do described_class.new values end let :values do ["Sean","Theresa"] end describe "#guess!" do it "guesses correctly" do guesser = double(Guesser) expect(guesser).to receive(:guess!) expect(Guesser).to receive(:new).with(subject.names).and_return(guesser) subject.guess! end end context "when the values are strings" do it "sets the names" do subject.names.each.with_index do |name, index| expect(name.value).to eq values[index] end end end context "when the values are names" do let :values do [Name.new("Sean"),Name.new("Theresa")] end it "sets the names" do expect(subject.names).to eq values end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gendered-0.0.1 | spec/lib/gendered/name_list_spec.rb |