Sha256: e988f3b045128905e28dbba5dde3790b23792ad74ffb1572aa9eb720e59de08e

Contents?: true

Size: 521 Bytes

Versions: 33

Compression:

Stored size: 521 Bytes

Contents

require File.expand_path('../test_helper', __FILE__)
module MeducationSDK
  class ResourceTest < Minitest::Test
    def self.test_resource(klass, url)
      define_method :klass do klass end
      define_method :url do url end

      class_eval do
        def test_path
          assert_equal url, klass.path
        end

        def test_generates_find_url
          id = 7
          Loquor::HttpAction::Get.expects(:get).with("#{url}/#{id}", anything())
          klass.find(id)
        end
      end
    end
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
meducation_sdk-1.4.3 test/resource_test.rb
meducation_sdk-1.4.2 test/resource_test.rb
meducation_sdk-1.4.1 test/resource_test.rb
meducation_sdk-1.4.0 test/resource_test.rb
meducation_sdk-1.3.0 test/resource_test.rb
meducation_sdk-1.2.6 test/resource_test.rb
meducation_sdk-1.2.5 test/resource_test.rb
meducation_sdk-1.2.4 test/resource_test.rb
meducation_sdk-1.2.3 test/resource_test.rb
meducation_sdk-1.2.2 test/resource_test.rb
meducation_sdk-1.2.1 test/resource_test.rb
meducation_sdk-1.2.0 test/resource_test.rb
meducation_sdk-1.1.2 test/resource_test.rb
meducation_sdk-1.1.1 test/resource_test.rb
meducation_sdk-1.1.0 test/resource_test.rb
meducation_sdk-1.0.0 test/resource_test.rb
meducation_sdk-0.10.1 test/resource_test.rb
meducation_sdk-0.10.0 test/resource_test.rb
meducation_sdk-0.9.0 test/resource_test.rb
meducation_sdk-0.8.0 test/resource_test.rb