spec/ast/function_spec.rb in dentaku-2.0.6 vs spec/ast/function_spec.rb in dentaku-2.0.7
- old
+ new
@@ -5,10 +5,12 @@
it 'maintains a function registry' do
expect(described_class).to respond_to(:get)
end
it 'raises an exception when trying to access an undefined function' do
- expect { described_class.get("flarble") }.to raise_error(RuntimeError, /undefined function/i)
+ expect {
+ described_class.get("flarble")
+ }.to raise_error(Dentaku::ParseError, /undefined function/i)
end
it 'registers a custom function' do
described_class.register("flarble", :string, -> { "flarble" })
expect { described_class.get("flarble") }.not_to raise_error