Skip to content
Browse files

Make the 'best available' test pending if yajl is missing.

  • Loading branch information...
1 parent 3f5eede commit 56e5f71a94cde865adcc6cb40f9f0097d48c71b5 @Flameeyes committed Jun 19, 2010
Showing with 6 additions and 2 deletions.
  1. +6 −2 spec/multi_json_spec.rb
View
8 spec/multi_json_spec.rb
@@ -13,8 +13,12 @@ def self.encode(string)
describe "MultiJson" do
context 'engines' do
it 'should default to the best available gem' do
- require 'yajl'
- MultiJson.engine.name.should == 'MultiJson::Engines::Yajl'
+ begin
+ require 'yajl'
+ MultiJson.engine.name.should == 'MultiJson::Engines::Yajl'
+ rescue LoadError
+ pending "YAJL (or a dependency) not available."
+ end
end
it 'should be settable via a symbol' do

0 comments on commit 56e5f71

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