test/jsonatra_spec.rb in jsonatra-1.0.2 vs test/jsonatra_spec.rb in jsonatra-1.0.3
- old
+ new
@@ -128,6 +128,26 @@
end
end
end
+ describe 'extensions' do
+
+ it 'camelcases strings' do # ugh
+ 'foo_bar_bat_123'.camelcase.must_equal 'fooBarBat123'
+ end
+
+ it 'camelcases symbols' do # ugh
+ :foo_bar_bat_123.camelcase.must_equal :fooBarBat123
+ end
+
+ it 'blanks properly' do
+ assert ''.blank?
+ assert nil.blank?
+ refute '1'.blank?
+ refute 1.blank?
+ refute 1.1.blank?
+ end
+
+ end
+
end