Sha256: ea857584dab85941bcb20c935b655c6ad35feb558937569f4adb127d9d837a32

Contents?: true

Size: 717 Bytes

Versions: 11

Compression:

Stored size: 717 Bytes

Contents

if respond_to?(:require_relative, true)
  require_relative 'common'
else
  require File.dirname(__FILE__) + '/common'
end

describe RestGraph do
  it 'would honor default attributes' do
    TestHelper.attrs_no_callback.each{ |name|
      RestGraph.new.send(name).should ==
        RestGraph.send("default_#{name}")

      RestGraph.new.send(name).should ==
        RestGraph::DefaultAttributes.send("default_#{name}")
    }
  end

  it 'could use module to override default attributes' do
    module BlahAttributes
      def default_app_id
        '1829'
      end
    end

    TestHelper.ensure_rollback{
      RestGraph.send(:extend, BlahAttributes)
      RestGraph.default_app_id.should == '1829'
    }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rest-graph-1.5.0 test/test_default.rb
rest-graph-1.4.6 test/test_default.rb
rest-graph-1.4.5 test/test_default.rb
rest-graph-1.4.4 test/test_default.rb
rest-graph-1.4.3 test/test_default.rb
rest-graph-1.4.2 test/test_default.rb
rest-graph-1.4.1 test/test_default.rb
rest-graph-1.4.0 test/test_default.rb
rest-graph-1.3.0 test/test_default.rb
rest-graph-1.2.1 test/test_default.rb
rest-graph-1.2.0 test/test_default.rb