Permalink
Browse files

try to fix travis only error

  • Loading branch information...
1 parent d3d26f4 commit a540335255c76df8546160944cfd7b697514e90f @mkristian committed Dec 29, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/ixtlan/babel/filter_config.rb
  2. +1 −1 spec/model_filter_spec.rb
@@ -38,11 +38,11 @@ def []( key )
end
def single_options( context_or_options )
- context_options( context_or_options ) || (context[default_context_key[0]]) || {}
+ context_options( context_or_options ) || context[ default_context_key[ 0 ] ] || {}
end
def collection_options( context_or_options )
- context_options( context_or_options ) || (context[default_context_key[1]]) || {}
+ context_options( context_or_options ) || context[ default_context_key[ 1 ] ] || {}
end
attr_accessor :root
@@ -56,7 +56,7 @@ class Person
it 'should serialize and deserialize with root' do
json = serializer.to_json :root => 'my'
result = deserializer.from_json(json, :root => 'my')
- attributes = result.attributes.delete_if { |k,v| v.nil? }
+ attributes = result.attributes.delete_if { |k,v| v.nil? || v.empty? }
attributes.must_equal Hash[:id => person['id'], :name => person['name']]
end

0 comments on commit a540335

Please sign in to comment.