File: private_options_test.rb

package info (click to toggle)
ruby-representable 3.0.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 896 kB
  • sloc: ruby: 6,432; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 439 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require "test_helper"

class PrivateOptionsTest < Minitest::Spec # TODO: move me to separate file.
  representer!(decorator: true) do
  end

  options = {exclude: "name"}

  it "render: doesn't modify options" do
    representer.new(nil).to_hash(options)
    options.must_equal({exclude: "name"})
  end

  it "parse: doesn't modify options" do
    representer.new(nil).from_hash(options)
    options.must_equal({exclude: "name"})
  end
end