From f49eb6b8e20a8517916d984d1606daaabbba9a23 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Wed, 6 May 2015 10:13:27 +0100 Subject: range(): fix TypeError(can't convert nil into Integer) when using range syntax --- spec/functions/range_spec.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'spec/functions/range_spec.rb') diff --git a/spec/functions/range_spec.rb b/spec/functions/range_spec.rb index ef86f97..f18b89e 100755 --- a/spec/functions/range_spec.rb +++ b/spec/functions/range_spec.rb @@ -68,6 +68,13 @@ describe "the range function" do end end + describe 'with a ruby-like range' do + it "returns a number range" do + result = scope.function_range(["1..4"]) + expect(result).to eq [1,2,3,4] + end + end + describe 'with a numeric range' do it "returns a range of numbers" do expected = (1..10).to_a -- cgit v1.2.3