Sha256: 1084c9f5e90a7846050ed317c12731e96f19060aba1eefa379d8b62a45035223
Contents?: true
Size: 523 Bytes
Versions: 4
Compression:
Stored size: 523 Bytes
Contents
::ENV['RACK_ENV'] = 'test' require File.join(File.dirname(__FILE__), 'spec_helper') describe 'RestfulModel' do before (:each) do @api = Inbox::API.new('app_id', 'app_secret', 'key') end describe "#as_json" do it "should return a hash with the attr_accessor properties" do r = Inbox::RestfulModel.new(@api) r.id = '1' r.namespace_id = '123'; r.created_at = Time.new expect(r.as_json).to eq({"id" => "1", "namespace_id" => "123", "created_at" => r.created_at}) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
inbox-0.4.3 | spec/restful_model_spec.rb |
inbox-0.4.2 | spec/restful_model_spec.rb |
inbox-0.4.1 | spec/restful_model_spec.rb |
inbox-0.4.0 | spec/restful_model_spec.rb |