Skip to content
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...
1 parent 0ed2054 commit 8d36779d84110875bf22ee1698a7f416aacac24f @Flameeyes Flameeyes committed Jun 19, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 spec/x_to_json_spec.rb
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
describe '.encode' do

0 comments on commit 8d36779

Please sign in to comment.
Something went wrong with that request. Please try again.