Sha256: 6d1be98012c0785559cae1e711f86214b06436b1cbace473731a06d722d8f3f6

Contents?: true

Size: 535 Bytes

Versions: 13

Compression:

Stored size: 535 Bytes

Contents

require 'rest-more/test'

describe RC::Facebook do
  should 'honor default attributes' do
    RC::Facebook.members.reject{ |name|
      name.to_s =~ /method$|handler$|detector$/ }.each{ |name|
        RC::Facebook.new.send(name).should ==
        RC::Facebook.new.send("default_#{name}")
    }
  end

  should 'use module to override default attributes' do
    klass = RC::Facebook.dup
    klass.send(:include, Module.new do
      def default_app_id
        '1829'
      end
    end)

    klass.new.app_id.should.eq('1829')
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rest-more-3.2.0 test/facebook/test_default.rb
rest-more-3.1.0 test/facebook/test_default.rb
rest-more-3.0.0 test/facebook/test_default.rb
rest-more-2.0.4 test/facebook/test_default.rb
rest-more-2.0.3 test/facebook/test_default.rb
rest-more-2.0.2 test/facebook/test_default.rb
rest-more-2.0.0 test/facebook/test_default.rb
rest-more-1.0.2 test/facebook/test_default.rb
rest-more-1.0.1 test/facebook/test_default.rb
rest-more-1.0.0 test/facebook/test_default.rb
rest-more-0.8.0 test/client/facebook/test_default.rb
rest-more-0.7.2.1 test/client/facebook/test_default.rb
rest-more-0.7.2 test/client/facebook/test_default.rb