Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Don't fail if a given engine couldn't be loaded.

This allows for proper spec running on implementations such as JRuby where
yajl cannot be loaded.
  • Loading branch information...
commit 8d36779d84110875bf22ee1698a7f416aacac24f 1 parent 0ed2054
@Flameeyes Flameeyes authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 spec/x_to_json_spec.rb
View
6 spec/x_to_json_spec.rb
@@ -31,7 +31,11 @@ def self.encode(string)
%w(active_support json_gem json_pure yajl).each do |engine|
context engine do
before do
- MultiJson.engine = engine
+ begin
+ MultiJson.engine = engine
+ rescue LoadError
+ pending "Engine #{engine} couldn't be loaded (not installed?)"
+ end
end
describe '.encode' do
Please sign in to comment.
Something went wrong with that request. Please try again.