Sha256: dbd15361b109f89ad0aa4288a10a925de5afb47db0f40996095f36a4a6f8a05b

Contents?: true

Size: 1.69 KB

Versions: 3

Compression:

Stored size: 1.69 KB

Contents

#--
# Copyright (c) 2012 Igor Fedoronchuk
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++

require_relative 'test_helper'



#made pass lint test because of "to_key should return nil when `persisted?` returns false" error
require "active_resource_response/lint"
ActiveResource::Base.send :include, ActiveResourceResponse::Lint

class ActiveResourceResponseLintTest <  MiniTest::Test

  include ActiveModel::Lint::Tests

   def setup
      @street = {:street => {:id => 1, :name => "Deribasovskaya", :population => 2300}}
      ActiveResource::HttpMock.respond_to do |mock|
         mock.get "/streets/1.json", {}, @street.to_json, 200, {"X-total"=>'1'}
      end
     @model = Street.find(1)   
   end



end
  

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activeresource-response-1.4.0 test/lint_test.rb
activeresource-response-1.3.0 test/lint_test.rb
activeresource-response-1.2.0 test/lint_test.rb