pandarus 0.4.0 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Pandarus
2
- VERSION = '0.4.0' unless defined?(Pandarus::VERSION)
2
+ VERSION = '0.4.5' unless defined?(Pandarus::VERSION)
3
3
  end
@@ -0,0 +1,26 @@
1
+ require_relative 'spec_helper'
2
+ require 'pandarus'
3
+
4
+ class TestModel < Pandarus::ModelBase
5
+ attr_accessor :id, :name
6
+ def self.attribute_map
7
+ {
8
+ :id => {:external => "id", :container => false, :type => "Integer"},
9
+ :name => {:external => "name", :container => false, :type => "String"}
10
+ }
11
+ end
12
+ end
13
+
14
+ describe Pandarus::ModelBase do
15
+ it "initializes" do
16
+ tm = TestModel.new(:id => 1, :name => "test")
17
+ tm.id.should == 1
18
+ tm.name.should == "test"
19
+ end
20
+
21
+ it "accepts attributes not in the map" do
22
+ lambda do
23
+ tm = TestModel.new(:id => 1, :integration_id => "blah")
24
+ end.should_not raise_error
25
+ end
26
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandarus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-24 00:00:00.000000000 Z
12
+ date: 2014-06-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -238,6 +238,7 @@ files:
238
238
  - lib/pandarus.rb
239
239
  - spec/api_base_spec.rb
240
240
  - spec/client_spec.rb
241
+ - spec/model_base_spec.rb
241
242
  - spec/sis_import_spec.rb
242
243
  - spec/spec_helper.rb
243
244
  - spec/user_spec.rb
@@ -269,6 +270,7 @@ summary: REST APIs
269
270
  test_files:
270
271
  - spec/api_base_spec.rb
271
272
  - spec/client_spec.rb
273
+ - spec/model_base_spec.rb
272
274
  - spec/sis_import_spec.rb
273
275
  - spec/spec_helper.rb
274
276
  - spec/user_spec.rb