Skip to content

Commit

Permalink
Make rake test work under 1.9 as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Empact committed Oct 22, 2010
1 parent 9f52b4d commit 6959acf
Show file tree
Hide file tree
Showing 17 changed files with 22 additions and 21 deletions.
2 changes: 1 addition & 1 deletion test/mocks/dictionaries.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'lib/roxml'
require_relative "./../../lib/roxml"

class DictionaryOfAttrs
include ROXML
Expand Down
2 changes: 1 addition & 1 deletion test/mocks/mocks.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require "lib/roxml"
require_relative "./../../lib/roxml"

class Muffins
include ROXML
Expand Down
6 changes: 3 additions & 3 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
require 'rubygems'
require 'active_support/test_case'
require 'test/mocks/mocks'
require 'test/mocks/dictionaries'
require 'test/support/fixtures'
require_relative './mocks/mocks'
require_relative './mocks/dictionaries'
require_relative './support/fixtures'

def to_xml_test(*names)
names = names.first if names.size == 1 && names.first.is_a?(Hash)
Expand Down
4 changes: 2 additions & 2 deletions test/unit/definition_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestDefinition < ActiveSupport::TestCase
def assert_hash(opts, kvp)
Expand All @@ -24,7 +24,7 @@ def test_block_shorthand_in_array_means_array
opts = ROXML::Definition.new(:intarray, :as => [Integer])
assert opts.array?
assert_equal :text, opts.sought_type
assert 1, opts.blocks.size
assert_equal 1, opts.blocks.size
end

def test_required
Expand Down
2 changes: 1 addition & 1 deletion test/unit/deprecations_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestDeprecation < ActiveSupport::TestCase
def test_as_array_not_deprecated
Expand Down
2 changes: 1 addition & 1 deletion test/unit/to_xml_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestHashToXml < ActiveSupport::TestCase
to_xml_test :dictionary_of_attrs,
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_attribute_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestXMLAttribute < ActiveSupport::TestCase
def test_attr_from
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_block_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class ArrayWithBlockShorthand
include ROXML
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_bool_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

PROC_TRUE = proc {|val| val ? 'TRUE' : 'FALSE'}
PROC_True = proc {|val| val ? 'True' : 'False'}
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_convention_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

XML_CAMELLOWER = %{
<bookCase name="Jonas' Books">
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_hash_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class BookWithContributorHash
include ROXML
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_initialize_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class InheritedBookWithDepth < Book
xml_reader :depth, :as => Measurement
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_name_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

# Parent | Child
# :from | no :from |
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_namespace_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestDefaultXMLNamespaces < ActiveSupport::TestCase
def setup
Expand Down
5 changes: 3 additions & 2 deletions test/unit/xml_object_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require 'test/test_helper'
# encoding: utf-8
require_relative './../test_helper'

class EmptyCart
include ROXML
Expand Down Expand Up @@ -171,7 +172,7 @@ def test_more_recursion
node = taxonomies.taxonomies.first.nodes.first
assert_equal 'Africa', node.name
assert_equal 'Algeria', node.nodes.first.name
assert_equal ['Algiers', "Gharda\303\257a", 'El Oued', 'Timimoun', 'Annaba'],
assert_equal ['Algiers', "Ghardaïa", 'El Oued', 'Timimoun', 'Annaba'],
node.nodes.first.nodes.map(&:name)
end

Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_required_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestXMLRequired < ActiveSupport::TestCase
def setup
Expand Down
2 changes: 1 addition & 1 deletion test/unit/xml_text_test.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
require 'test/test_helper'
require_relative './../test_helper'

class TestXMLText < ActiveSupport::TestCase
# Test a simple mapping with no composition
Expand Down

0 comments on commit 6959acf

Please sign in to comment.