Sha256: 11bb3431a6bd2cddcb780821c585ac263123bd2d048131b7d6fa5e5d5d095d5e

Contents?: true

Size: 675 Bytes

Versions: 10

Compression:

Stored size: 675 Bytes

Contents

require 'rspec'
require 'webmock/rspec'
require 'json'
require 'coveralls'

Coveralls.wear!

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.root_node = '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

class InvoiceItem < ApiClient::Base
end

ApiClient.configure do |config|
  config.path = 'http://api.example.com'
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
api-client-3.1.0 spec/spec_helper.rb
api-client-3.0.0 spec/spec_helper.rb
api-client-2.7.0 spec/spec_helper.rb
api-client-2.6.0 spec/spec_helper.rb
api-client-2.5.0 spec/spec_helper.rb
api-client-2.5.0.rc1 spec/spec_helper.rb
api-client-2.4.0 spec/spec_helper.rb
api-client-2.3.0 spec/spec_helper.rb
api-client-2.2.0 spec/spec_helper.rb
api-client-2.1.0 spec/spec_helper.rb