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

Version Path
active_scaffold-3.4.43 test/data_structures/error_message_test.rb
active_scaffold-3.4.42 test/data_structures/error_message_test.rb
active_scaffold-3.4.41.1 test/data_structures/error_message_test.rb
active_scaffold-3.4.41 test/data_structures/error_message_test.rb
active_scaffold-3.4.40 test/data_structures/error_message_test.rb
active_scaffold-3.4.39 test/data_structures/error_message_test.rb
active_scaffold-3.4.38 test/data_structures/error_message_test.rb
active_scaffold-3.4.37 test/data_structures/error_message_test.rb
active_scaffold-3.4.36 test/data_structures/error_message_test.rb
active_scaffold-3.4.35 test/data_structures/error_message_test.rb
active_scaffold-3.4.34 test/data_structures/error_message_test.rb
active_scaffold-3.4.33 test/data_structures/error_message_test.rb
active_scaffold-3.4.32 test/data_structures/error_message_test.rb
active_scaffold-3.4.31 test/data_structures/error_message_test.rb
active_scaffold-3.4.30 test/data_structures/error_message_test.rb
active_scaffold-3.4.29 test/data_structures/error_message_test.rb
active_scaffold-3.4.28 test/data_structures/error_message_test.rb
active_scaffold-3.4.27 test/data_structures/error_message_test.rb
active_scaffold-3.4.26 test/data_structures/error_message_test.rb
active_scaffold-3.4.25 test/data_structures/error_message_test.rb