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-0.7.0 test/resource_test.rb
meducation_sdk-0.6.1 test/resource_test.rb
meducation_sdk-0.6.0 test/resource_test.rb
meducation_sdk-0.5.0 test/resource_test.rb
meducation_sdk-0.4.1 test/resource_test.rb
meducation_sdk-0.4.0 test/resource_test.rb
meducation_sdk-0.3.4 test/resource_test.rb
meducation_sdk-0.3.3 test/resource_test.rb
meducation_sdk-0.3.2 test/resource_test.rb
meducation_sdk-0.3.1 test/resource_test.rb
meducation_sdk-0.3.0 test/resource_test.rb
meducation_sdk-0.2.0 test/resource_test.rb
meducation_sdk-0.1.0 test/resource_test.rb