test/functional/storage_helper.rb in ruote-2.1.1 vs test/functional/storage_helper.rb in ruote-2.1.2

- old
+ new

@@ -40,11 +40,15 @@ ps = ARGV.select { |a| a.match(/^--/) } persistent = opts.delete(:persistent) if ps.include?('--fs') - require 'yajl' rescue require 'json' + begin + require 'yajl' + rescue LoadError + require 'json' + end Rufus::Json.detect_backend Ruote::FsStorage.new('work', opts) elsif not ps.empty? @@ -64,10 +68,14 @@ new_storage(opts) elsif persistent - require 'yajl' rescue require 'json' + begin + require 'yajl' + rescue LoadError + require 'json' + end Rufus::Json.detect_backend Ruote::FsStorage.new('work', opts) else