- describe 'with a letter range' do
- it "returns a letter range" do
- result = scope.function_range(["a","d"])
- expect(result).to eq ['a','b','c','d']
- end
+ context 'with characters as bounds' do
+ it { is_expected.to run.with_params('d', 'a').and_return([]) }
+ it { is_expected.to run.with_params('a', 'a').and_return(['a']) }
+ it { is_expected.to run.with_params('a', 'b').and_return(['a', 'b']) }
+ it { is_expected.to run.with_params('a', 'd').and_return(['a', 'b', 'c', 'd']) }
+ it { is_expected.to run.with_params('a', 'd', 1).and_return(['a', 'b', 'c', 'd']) }
+ it { is_expected.to run.with_params('a', 'd', '1').and_return(['a', 'b', 'c', 'd']) }
+ it { is_expected.to run.with_params('a', 'd', 2).and_return(['a', 'c']) }
+ it { is_expected.to run.with_params('a', 'd', -2).and_return(['a', 'c']) }
+ it { is_expected.to run.with_params('a', 'd', 3).and_return(['a', 'd']) }
+ it { is_expected.to run.with_params('a', 'd', 4).and_return(['a']) }
+ end