xml_fixtures 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/xml_fixture_helper.rb +2 -1
- metadata +4 -4
data/lib/xml_fixture_helper.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
module XmlFixtureHelper
|
2
2
|
def get_xml_fixture(filename)
|
3
|
+
filename = filename.to_s + '.xml' if filename.is_a? Symbol
|
3
4
|
fixture_xml = ''
|
4
5
|
File.open(File.join( xml_fixture_path, filename )) do |f|
|
5
6
|
fixture_xml = f.read
|
@@ -8,7 +9,7 @@ module XmlFixtureHelper
|
|
8
9
|
end
|
9
10
|
|
10
11
|
def assert_xml_equal(first, second)
|
11
|
-
first = get_xml_fixture(first
|
12
|
+
first = get_xml_fixture(first) if first.is_a? Symbol
|
12
13
|
assert_block("#{first.to_s} expected but was\n#{second.to_s}") do
|
13
14
|
REXML::Document.new(first) == REXML::Document.new(second)
|
14
15
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xml_fixtures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 4
|
10
|
+
version: 0.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- QualitySmith Inc.
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-29 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies: []
|
21
21
|
|