require 'rspec' require './unique_pair' RSpec.describe UniquePair do describe '.unique_pairs' do subject { described_class.unique_pairs(input) } context 'when an array of numbers is provided' do let(:input) { [0, 1, 100, 99, 0, 10, 90, 30, 55, 33, 55, 75, 50, 51, 49, 50, 51, 49, 51] } let(:output) { [[1,99], [0,100], [10,90], [49,51], [50,50]] } it 'returns all unique pairs which sum up to 100' do expect(subject).to match_array output end end context 'when no input is provided' do let(:input) { nil } let(:output) { [] } it 'returns an empty array' do expect(subject).to match_array output end end end end