This repository has been archived on 2020-02-24. You can view files and clone it, but cannot push or open issues or pull requests.
plsql-spec-example/spec/betwnstr_spec.rb
2020-01-16 14:11:30 +03:00

23 lines
542 B
Ruby

# load 'betwnstr' procedure into the database
require "betwnstr"
describe "Between string" do
it "should be correct in normal case" do
expect(plsql.betwnstr('abcdefg', 2, 5)).to eq 'bcde'
end
it "should be correct with zero start value" do
expect(plsql.betwnstr('abcdefg', 0, 5)).to eq 'abcde'
end
it "should be correct with way big end value" do
expect(plsql.betwnstr('abcdefg', 5, 500)).to eq 'efg'
end
it "should be correct with NULL string" do
expect(plsql.betwnstr(NULL, 5, 500)).to eq NULL
end
end