summaryrefslogtreecommitdiffhomepage
path: root/test/util/tc_serialized_attributes.rb
blob: 4ba90b292956e860e21adf9577c2649353dae6fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
require 'tc_helper'

class Funk
  include Axlsx::Accessors
  include Axlsx::SerializedAttributes
  serializable_attributes :camel_symbol, :boolean, :integer

  attr_accessor :camel_symbol, :boolean, :integer
end

class TestSeralizedAttributes < Test::Unit::TestCase
  def setup
    @object = Funk.new
  end

  def test_camel_symbol
    @object.camel_symbol = :foo_bar

    assert_equal('camelSymbol="fooBar" ', @object.serialized_attributes)
  end
end