Sha256: 374decdd94e86fd164aa64f778f5f987cb13e0ad9ada6239899c01b781ba93b0
Contents?: true
Size: 588 Bytes
Versions: 29
Compression:
Stored size: 588 Bytes
Contents
require 'test_helper' class ErrorMessageTest < MiniTest::Test def setup @error = ActiveScaffold::DataStructures::ErrorMessage.new 'foo' end def test_attributes assert @error.public_attributes.key?(:error) assert_equal 'foo', @error.public_attributes[:error] end def test_xml xml = Hash.from_xml(@error.to_xml) assert xml.key?('errors') assert xml['errors'].key?('error') assert_equal 'foo', xml['errors']['error'] end def test_yaml yml = YAML.load(@error.to_yaml) assert yml.key?(:error) assert_equal 'foo', yml[:error] end end
Version data entries
29 entries across 29 versions & 1 rubygems