<commit_before># encoding: utf-8
require 'test_helper'
require 'hal_api/representer'
require 'hal_api/representer/link_serialize'

describe HalApi::Representer::LinkSerialize do

  it 'sets a default curie' do

    class TestRepresenter < Roar::Decorator
      include Roar::JSON::HAL
      include HalApi::Representer::LinkSerialize

      link rel: :foo, writeable: true do
        { href: '/foo' }
      end
    end

    TestRepresenter.representable_attrs[:definitions]['set_foo_uri'].wont_be_nil
    TestRepresenter.representable_attrs[:definitions]['set_foo_uri'][:readable].must_equal false
    TestRepresenter.representable_attrs[:definitions]['set_foo_uri'][:reader].wont_be_nil
  end
end<commit_msg>Update bad test desc<commit_after># encoding: utf-8
require 'test_helper'
require 'hal_api/representer'
require 'hal_api/representer/link_serialize'

describe HalApi::Representer::LinkSerialize do

  it 'adds a property to set a linked resource' do

    class TestRepresenter < Roar::Decorator
      include Roar::JSON::HAL
      include HalApi::Representer::LinkSerialize

      link rel: :foo, writeable: true do
        { href: '/foo' }
      end
    end

    TestRepresenter.representable_attrs[:definitions]['set_foo_uri'].wont_be_nil
    TestRepresenter.representable_attrs[:definitions]['set_foo_uri'][:readable].must_equal false
    TestRepresenter.representable_attrs[:definitions]['set_foo_uri'][:reader].wont_be_nil
  end
end
{'fraction_non_alphanumeric': 0.10380622837370242, 'fraction_numerical': 0.001384083044982699, 'mean_word_length': 5.07563025210084, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '360824', 'n_tokens_mistral': 474, 'n_tokens_neox': 443, 'n_words': 88}