File: private_options_test.rb

package info (click to toggle)
ruby-representable 3.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 952 kB
  • sloc: ruby: 6,495; makefile: 4
file content (18 lines) | stat: -rw-r--r-- 445 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