Sha256: 89f82cbf85afa405346fdc61dc73890635898c23b41b4892e2d99879418878a1

Contents?: true

Size: 522 Bytes

Versions: 6

Compression:

Stored size: 522 Bytes

Contents

require "rspec"
require 'webmock/rspec'
require "json"

require File.dirname(__FILE__) + "/../lib/api-client"

class User < ApiClient::Base
  attr_accessor :a, :b

  validates_presence_of :a
  validates_inclusion_of :a, :in => %w(a A)
end

class Admin < ApiClient::Base
  self.remote_object = "user"

  attr_accessor :a, :b
end

class Post < ApiClient::Base
  self.association({ :writer => "User" })

  attr_accessor :a
end

class Group < ApiClient::Base
  self.associations({ :members => "User", :owner => "Admin" })
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
api-client-1.9.1 spec/spec_helper.rb
api-client-1.9.0 spec/spec_helper.rb
api-client-1.8.2 spec/spec_helper.rb
api-client-1.8.1 spec/spec_helper.rb
api-client-1.8.0 spec/spec_helper.rb
api-client-1.7.1 spec/spec_helper.rb