spec/spec_helper.rb in dentaku-3.3.0 vs spec/spec_helper.rb in dentaku-3.3.1

- old
+ new

@@ -14,13 +14,15 @@ add_filter "spec/" end RSpec.configure do |c| c.before(:all) { - # add example for alias because we can set aliases just once - # before `calculator` method called - Dentaku.aliases = { roundup: ['roundupup'] } + if Dentaku.respond_to?(:aliases=) + # add example for alias because we can set aliases just once + # before `calculator` method called + Dentaku.aliases = { roundup: ['roundupup'] } + end } end # automatically create a token stream from bare values def token_stream(*args) @@ -43,10 +45,10 @@ :operator when :open, :close, :comma :grouping when :lbracket, :rbracket :access - when :le, :ge, :ne, :ne, :lt, :gt, :eq + when :le, :ge, :ne, :lt, :gt, :eq :comparator when :and, :or :combinator when :if, :round, :roundup, :rounddown, :not :function