Sha256: 8d2cf88a0362b053bd04f642a930c342f59d14e08089223224cb5efe2d287823

Contents?: true

Size: 503 Bytes

Versions: 28

Compression:

Stored size: 503 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
require 'json'

include ApiResource

describe "Local" do
  
  it "should not go to the server to fetch a resource definition" do
    ApiResource::Connection.any_instance.expects(:get).never
    class MyTestResource < ApiResource::Local
      scope :test, {:test => true}
    end
    mtr = MyTestResource.new
    # should still have scopes
    MyTestResource.reload_class_attributes
    mtr.scopes.should_not be_blank
    
  end
  
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
api_resource-0.4.3 spec/lib/local_spec.rb
api_resource-0.4.2 spec/lib/local_spec.rb
api_resource-0.4.0 spec/lib/local_spec.rb
api_resource-0.3.14 spec/lib/local_spec.rb
api_resource-0.3.13 spec/lib/local_spec.rb
api_resource-0.3.12 spec/lib/local_spec.rb
api_resource-0.3.11 spec/lib/local_spec.rb
api_resource-0.3.10 spec/lib/local_spec.rb
api_resource-0.3.8 spec/lib/local_spec.rb
api_resource-0.3.7 spec/lib/local_spec.rb
api_resource-0.3.6 spec/lib/local_spec.rb
api_resource-0.3.5 spec/lib/local_spec.rb
api_resource-0.3.4 spec/lib/local_spec.rb
api_resource-0.3.3 spec/lib/local_spec.rb
api_resource-0.3.2 spec/lib/local_spec.rb
api_resource-0.3.1 spec/lib/local_spec.rb
api_resource-0.3.0 spec/lib/local_spec.rb
api_resource-0.2.11 spec/lib/local_spec.rb
api_resource-0.2.10 spec/lib/local_spec.rb
api_resource-0.2.9 spec/lib/local_spec.rb