Sha256: 34b0a3832938a0b82a9113883e1d8337d8a9c62ab69f0a412c0698d1fd3b7618

Contents?: true

Size: 781 Bytes

Versions: 1

Compression:

Stored size: 781 Bytes

Contents

module RubyQuiz2
  describe SelectionParty do

    subject do
      described_class.new people_list
    end

    context "with a feasible people list" do
      let :people_list do
        PeopleList.new(File.read(File.expand_path("../../../fixtures/people_lists/feasible.txt", __FILE__)))
      end

      it "can make selections" do
        subject.make_selections
        expect(subject.selections.size).to eq people_list.length
      end
    end

    context "with an infeasible people list" do
      let :people_list do
        PeopleList.new(File.read(File.expand_path("../../../fixtures/people_lists/infeasible.txt", __FILE__)))
      end

      it "cannot make selections" do
        expect{subject.make_selections}.to raise_error ArgumentError
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby_quiz_2-1.0.0 spec/lib/ruby_quiz_2/selection_party_spec.rb