Sha256: b6f087a2b758d2a2897b004bb3d12f1bc90dc46d6b0962e823a3b4289008bb7a

Contents?: true

Size: 683 Bytes

Versions: 6

Compression:

Stored size: 683 Bytes

Contents

require 'rest-more/test'

describe RC::Facebook do
  would 'be serialized with lighten' do
    require 'yaml'
    [YAML, Marshal].each{ |engine|
      test = lambda{ |obj| engine.load(engine.dump(obj)) }
        rg = RC::Facebook.new(:error_handler => lambda{})
      lambda{ test[rg] }.should.raise(TypeError)
      test[rg.lighten].should.eq rg.lighten
      lambda{ test[rg] }.should.raise(TypeError)
      rg.lighten!
      test[rg.lighten].should.eq rg
    }
  end

  would 'lighten takes options to change attributes' do
    RC::Facebook.new.lighten(:timeout => 100    ).timeout.should.eq 100
    RC::Facebook.new.lighten(:lang    => 'zh-TW').lang.should.eq 'zh-TW'
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rest-more-3.4.0 test/facebook/test_serialize.rb
rest-more-3.3.4 test/facebook/test_serialize.rb
rest-more-3.3.3 test/facebook/test_serialize.rb
rest-more-3.3.2 test/facebook/test_serialize.rb
rest-more-3.3.1 test/facebook/test_serialize.rb
rest-more-3.3.0 test/facebook/test_serialize.rb