summaryrefslogtreecommitdiffhomepage
path: root/test/util/tc_serialized_attributes.rb
diff options
context:
space:
mode:
authorRandy Morgan <[email protected]>2013-08-17 13:53:14 +0900
committerRandy Morgan <[email protected]>2013-08-17 13:53:14 +0900
commit7bd3f1fa3837f0387ac18f5caaac89d1986592a8 (patch)
tree0429cb61f4e863896c036b5faaa705ffe0892a7a /test/util/tc_serialized_attributes.rb
parent11863dd63a2331907d6af7d4aa8ce08dca85698d (diff)
downloadcaxlsx-7bd3f1fa3837f0387ac18f5caaac89d1986592a8.tar.gz
caxlsx-7bd3f1fa3837f0387ac18f5caaac89d1986592a8.zip
add spec to ensure that serialized symbol values are cameled.
Diffstat (limited to 'test/util/tc_serialized_attributes.rb')
-rw-r--r--test/util/tc_serialized_attributes.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/util/tc_serialized_attributes.rb b/test/util/tc_serialized_attributes.rb
new file mode 100644
index 00000000..88c7536d
--- /dev/null
+++ b/test/util/tc_serialized_attributes.rb
@@ -0,0 +1,19 @@
+require 'tc_helper.rb'
+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