Sha256: 44860b24a3852a3e204972e8f8959fee22ce8ae049f230b5bb573835602de768
Contents?: true
Size: 869 Bytes
Versions: 5
Compression:
Stored size: 869 Bytes
Contents
require_relative '../test_helper' require 'hyperclient/curie' require 'hyperclient/entry_point' module Hyperclient describe Curie do let(:entry_point) do EntryPoint.new('http://api.example.org/') end describe 'templated?' do it 'returns true if the curie is templated' do curie = Curie.new({ 'name' => 'image', 'templated' => true }, entry_point) curie.templated?.must_equal true end it 'returns false if the curie is not templated' do curie = Curie.new({ 'name' => 'image' }, entry_point) curie.templated?.must_equal false end end let(:curie) do Curie.new({ 'name' => 'image', 'href' => '/images/{?rel}', 'templated' => true }, entry_point) end describe '_name' do it 'returns curie name' do curie.name.must_equal 'image' end end end end
Version data entries
5 entries across 5 versions & 1 rubygems