test_xml 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ ## 0.1.3
2
+
3
+ * Adding support for `MiniTest::Spec` matchers.
@@ -1,6 +1,8 @@
1
1
  require 'nokogiri'
2
2
  require 'test_xml/nokogiri/node'
3
3
  require 'test_xml/nokogiri'
4
+ require 'test_xml/assertions'
5
+ require 'test_xml/matcher_methods'
4
6
 
5
7
  module TestXml
6
8
  class << self
@@ -0,0 +1,44 @@
1
+ require 'ostruct'
2
+
3
+ module TestXml
4
+ class AssertionConfig < OpenStruct
5
+ def assert_name
6
+ "assert_#{name}"
7
+ end
8
+
9
+ def assert_not_name
10
+ "assert_not_#{name}"
11
+ end
12
+
13
+ def expectation
14
+ "must_#{matcher}"
15
+ end
16
+ end
17
+
18
+ ASSERTIONS = [
19
+ AssertionConfig.new(
20
+ :name => :xml_contain,
21
+ :matcher => :contain_xml,
22
+ :message_for_should => lambda { |a,b| "the xml:\n#{a}\nshould contain xml:\n#{b}" },
23
+ :message_for_should_not => lambda { |a,b| "the xml:\n#{a}\nshould not contain xml:\n#{b} but it does" }
24
+ ),
25
+ AssertionConfig.new(
26
+ :name => :xml_structure_contain,
27
+ :matcher => :contain_xml_structure,
28
+ :message_for_should => lambda { |a,b| "the xml:\n#{a}\nshould match xml structure:\n#{b}" },
29
+ :message_for_should_not => lambda { |a,b| "the xml:\n#{a}\nshould not match xml structure:\n#{b} but it does" }
30
+ ),
31
+ AssertionConfig.new(
32
+ :name => :xml_equal,
33
+ :matcher => :equal_xml,
34
+ :message_for_should => lambda { |a,b| "the xml:\n#{a}\nshould exactly match xml:\n#{b}" },
35
+ :message_for_should_not => lambda { |a,b| "the xml:\n#{a}\nshould not exactly match xml:\n#{b} but it does" }
36
+ ),
37
+ AssertionConfig.new(
38
+ :name => :xml_structure_equal,
39
+ :matcher => :equal_xml_structure,
40
+ :message_for_should => lambda { |a,b| "the xml:\n#{a}\nshould exactly match xml structure:\n#{b}" },
41
+ :message_for_should_not => lambda { |a,b| "the xml:\n#{a}\nshould not exactly match xml structure:\n#{b} but it does" }
42
+ )
43
+ ]
44
+ end
@@ -1,6 +1,12 @@
1
1
  require "test_xml"
2
- require 'test_xml/test_unit/assertions'
3
2
 
4
- class MiniTest::Unit::TestCase
3
+ MiniTest::Unit::TestCase.class_eval do
5
4
  include TestXml::TestUnit::Assertions
6
5
  end
6
+
7
+ # TODO: should we remove test_xml/spec?
8
+ MiniTest::Expectations.class_eval do
9
+ TestXml::ASSERTIONS.each do |cfg|
10
+ infect_an_assertion(cfg.assert_name, cfg.expectation)
11
+ end
12
+ end
@@ -1,2 +1,18 @@
1
1
  require 'test_xml'
2
- require 'test_xml/spec/matchers.rb'
2
+
3
+ # Adds assertions to RSpec.
4
+ TestXml::ASSERTIONS.each do |cfg|
5
+ RSpec::Matchers.define cfg.matcher do |expected|
6
+ match do |actual|
7
+ TestXml::MatcherMethods.send(cfg.name, actual, expected)
8
+ end
9
+
10
+ failure_message_for_should do |actual|
11
+ cfg.message_for_should.call(expected, actual)
12
+ end
13
+
14
+ failure_message_for_should_not do |actual|
15
+ cfg.message_for_should_not.call(expected, actual)
16
+ end
17
+ end
18
+ end
@@ -1,6 +1,5 @@
1
1
  require "test/unit"
2
2
  require "test_xml"
3
- require 'test_xml/test_unit/assertions'
4
3
 
5
4
  class Test::Unit::TestCase
6
5
  include TestXml::TestUnit::Assertions
@@ -1,41 +1,17 @@
1
- require 'test_xml/matcher_methods'
2
-
3
1
  module TestXml
4
2
  module TestUnit
5
3
  module Assertions
6
-
7
- def self.assertions_for(name, options)
8
- define_method("assert_#{name}") do |subject, pattern|
9
- full_message = options[:message_for_should].gsub(/\<pattern\>/, pattern).gsub(/\<subject\>/, subject)
10
-
11
- correct_assert(MatcherMethods.send(name, subject, pattern), full_message)
4
+ ASSERTIONS.each do |cfg|
5
+ define_method(cfg.assert_name) do |a, b|
6
+ correct_assert(MatcherMethods.send(cfg.name, a, b), cfg.message_for_should.call(a, b))
12
7
  end
13
8
 
14
- define_method("assert_not_#{name}") do |subject, pattern|
15
- full_message = options[:message_for_should_not].gsub(/\<pattern\>/, pattern).gsub(/\<subject\>/, subject)
16
-
17
- correct_assert(!MatcherMethods.send(name, subject, pattern), full_message)
9
+ define_method(cfg.assert_not_name) do |a, b|
10
+ correct_assert(! MatcherMethods.send(cfg.name, a, b), cfg.message_for_should_not.call(a, b))
18
11
  end
19
12
  end
20
-
21
-
22
- assertions_for :xml_contain,
23
- :message_for_should => "the xml:\n<subject>\nshould contain xml:\n<pattern>",
24
- :message_for_should_not => "the xml:\n<subject>\nshould not contain xml:\n<pattern> but it does"
25
-
26
- assertions_for :xml_equal,
27
- :message_for_should => "the xml:\n<subject>\nshould exactly match xml:\n<pattern>",
28
- :message_for_should_not => "the xml:\n<subject>\nshould not exactly match xml:\n<pattern> but it does"
29
-
30
- assertions_for :xml_structure_contain,
31
- :message_for_should => "the xml:\n<subject>\nshould match xml structure:\n<pattern>",
32
- :message_for_should_not => "the xml:\n<subject>\nshould not match xml structure:\n<pattern> but it does"
33
-
34
- assertions_for :xml_structure_equal,
35
- :message_for_should => "the xml:\n<subject>\nshould exactly match xml structure:\n<pattern>",
36
- :message_for_should_not => "the xml:\n<subject>\nshould not exactly match xml structure:\n<pattern> but it does"
37
13
 
38
- private
14
+ private
39
15
  def correct_assert(boolean, message)
40
16
  if RUBY_VERSION =~ /1.9.2/ or defined?(MiniTest)
41
17
  assert(boolean, message)
@@ -1,3 +1,3 @@
1
1
  module TestXml
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
@@ -2,7 +2,7 @@ require 'test_helper'
2
2
 
3
3
  class TestAssertions < Test::Unit::TestCase
4
4
  def test_assert_xml_contain_message_if_fails
5
- begin
5
+ begin
6
6
  assert_xml_contain("<root><one>1</one><one>2</one></root>", "<root><one>3</one></root>")
7
7
  rescue Exception => e
8
8
  assert_match %r{the xml:\n<root><one>1</one><one>2</one></root>\nshould contain xml:\n<root><one>3</one></root>}, e.message
@@ -10,14 +10,13 @@ class TestAssertions < Test::Unit::TestCase
10
10
  end
11
11
 
12
12
  def test_assert_xml_not_contain_message_if_fails
13
- begin
13
+ begin
14
14
  assert_not_xml_contain("<root><one>1</one><one>2</one></root>", "<root><one>1</one><one>2</one></root>")
15
15
  rescue Exception => e
16
- assert_match %r{the xml:\n<root><one>1</one><one>2</one></root>\nshould not contain xml:\n<root><one>1</one><one>2</one></root> but it does},
17
- e.message
16
+ assert_match %r{the xml:\n<root><one>1</one><one>2</one></root>\nshould not contain xml:\n<root><one>1</one><one>2</one></root> but it does}, e.message
18
17
  end
19
18
  end
20
-
19
+
21
20
  def test_assert_xml_contain
22
21
  expected = <<-XML
23
22
  <root>
@@ -25,13 +24,13 @@ class TestAssertions < Test::Unit::TestCase
25
24
  <two>2</two>
26
25
  </root>
27
26
  XML
28
-
27
+
29
28
  actual = <<-XML
30
29
  <root>
31
30
  <one id="first">1</one>
32
31
  </root>
33
32
  XML
34
-
33
+
35
34
  assert_xml_contain expected, actual
36
35
  end
37
36
 
@@ -41,13 +40,13 @@ class TestAssertions < Test::Unit::TestCase
41
40
  <one>1</one>
42
41
  </root>
43
42
  XML
44
-
43
+
45
44
  actual = <<-XML
46
45
  <root>
47
46
  <one>2</one>
48
47
  </root>
49
48
  XML
50
-
49
+
51
50
  assert_not_xml_contain expected, actual
52
51
  end
53
52
 
@@ -60,7 +59,7 @@ class TestAssertions < Test::Unit::TestCase
60
59
  </two>
61
60
  </root>
62
61
  XML
63
-
62
+
64
63
  actual = <<-XML
65
64
  <root>
66
65
  <one>2</one>
@@ -69,7 +68,7 @@ class TestAssertions < Test::Unit::TestCase
69
68
  </two>
70
69
  </root>
71
70
  XML
72
-
71
+
73
72
  assert_xml_structure_contain expected, actual
74
73
  end
75
74
 
@@ -82,7 +81,7 @@ class TestAssertions < Test::Unit::TestCase
82
81
  </two>
83
82
  </root>
84
83
  XML
85
-
84
+
86
85
  actual = <<-XML
87
86
  <root>
88
87
  <one>2</one>
@@ -91,7 +90,7 @@ class TestAssertions < Test::Unit::TestCase
91
90
  </two>
92
91
  </root>
93
92
  XML
94
-
93
+
95
94
  assert_not_xml_structure_contain expected, actual
96
95
  end
97
96
 
@@ -102,17 +101,17 @@ class TestAssertions < Test::Unit::TestCase
102
101
  <two>2</two>
103
102
  </root>
104
103
  XML
105
-
104
+
106
105
  actual = <<-XML
107
106
  <root>
108
107
  <one>1</one>
109
108
  <two>2</two>
110
109
  </root>
111
110
  XML
112
-
111
+
113
112
  assert_xml_equal expected, actual
114
113
  end
115
-
114
+
116
115
  def test_assert_xml_equal_with_attributes
117
116
  expected = <<-XML
118
117
  <root>
@@ -120,14 +119,14 @@ class TestAssertions < Test::Unit::TestCase
120
119
  <two b="second" a="first" />
121
120
  </root>
122
121
  XML
123
-
122
+
124
123
  actual = <<-XML
125
124
  <root>
126
125
  <one a="first" b="second">1</one>
127
126
  <two b="second" a="first" />
128
127
  </root>
129
128
  XML
130
-
129
+
131
130
  assert_xml_equal expected, actual
132
131
  end
133
132
 
@@ -138,47 +137,47 @@ class TestAssertions < Test::Unit::TestCase
138
137
  <two/>
139
138
  </root>
140
139
  XML
141
-
140
+
142
141
  actual = <<-XML
143
142
  <root type="test">
144
143
  <one>1</one>
145
144
  <two/>
146
145
  </root>
147
146
  XML
148
-
147
+
149
148
  assert_xml_equal expected, actual
150
149
  end
151
-
150
+
152
151
  def test_assert_not_xml_equal_with_attributes
153
152
  expected = <<-XML
154
153
  <root>
155
154
  <one b="second" a="first">1</one>
156
155
  </root>
157
156
  XML
158
-
157
+
159
158
  actual = <<-XML
160
159
  <root>
161
160
  <one a="whoops, wrong" b="second">1</one>
162
161
  </root>
163
162
  XML
164
-
163
+
165
164
  assert_not_xml_equal expected, actual
166
165
  end
167
166
 
168
-
167
+
169
168
  def test_assert_not_xml_equal_with_attributes_and_no_text
170
169
  expected = <<-XML
171
170
  <root>
172
171
  <one b="second" a="first" />
173
172
  </root>
174
173
  XML
175
-
174
+
176
175
  actual = <<-XML
177
176
  <root>
178
177
  <one a="whoops, wrong" b="second" />
179
178
  </root>
180
179
  XML
181
-
180
+
182
181
  assert_not_xml_equal expected, actual
183
182
  end
184
183
 
@@ -189,14 +188,14 @@ class TestAssertions < Test::Unit::TestCase
189
188
  <two/>
190
189
  </root>
191
190
  XML
192
-
191
+
193
192
  actual = <<-XML
194
193
  <root>
195
194
  <one>1</one>
196
195
  <two/>
197
196
  </root>
198
197
  XML
199
-
198
+
200
199
  assert_not_xml_equal expected, actual
201
200
  end
202
201
 
@@ -207,16 +206,16 @@ class TestAssertions < Test::Unit::TestCase
207
206
  <two>2</two>
208
207
  </root>
209
208
  XML
210
-
209
+
211
210
  actual = <<-XML
212
211
  <root>
213
212
  <one>1</one>
214
213
  </root>
215
214
  XML
216
-
215
+
217
216
  assert_not_xml_equal expected, actual
218
217
  end
219
-
218
+
220
219
  def test_assert_xml_structure_equal
221
220
  expected = <<-XML
222
221
  <root>
@@ -226,7 +225,7 @@ class TestAssertions < Test::Unit::TestCase
226
225
  </two>
227
226
  </root>
228
227
  XML
229
-
228
+
230
229
  actual = <<-XML
231
230
  <root>
232
231
  <one>2</one>
@@ -235,7 +234,7 @@ class TestAssertions < Test::Unit::TestCase
235
234
  </two>
236
235
  </root>
237
236
  XML
238
-
237
+
239
238
  assert_xml_structure_equal expected, actual
240
239
  end
241
240
 
@@ -248,7 +247,7 @@ class TestAssertions < Test::Unit::TestCase
248
247
  </two>
249
248
  </root>
250
249
  XML
251
-
250
+
252
251
  actual = <<-XML
253
252
  <root>
254
253
  <one>2</one>
@@ -258,7 +257,7 @@ class TestAssertions < Test::Unit::TestCase
258
257
  </two>
259
258
  </root>
260
259
  XML
261
-
260
+
262
261
  assert_not_xml_structure_equal expected, actual
263
262
  end
264
263
  end
metadata CHANGED
@@ -1,90 +1,103 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: test_xml
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
4
5
  prerelease:
5
- version: 0.1.2
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Pavel Gabriel
9
9
  - Nick Sutterer
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
-
14
- date: 2011-04-21 00:00:00 +03:00
15
- default_executable:
16
- dependencies:
17
- - !ruby/object:Gem::Dependency
13
+ date: 2013-04-22 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
18
16
  name: nokogiri
19
- prerelease: false
20
- requirement: &id001 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
21
18
  none: false
22
- requirements:
23
- - - ">="
24
- - !ruby/object:Gem::Version
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
25
22
  version: 1.3.2
26
23
  type: :runtime
27
- version_requirements: *id001
28
- - !ruby/object:Gem::Dependency
29
- name: rake
30
24
  prerelease: false
31
- requirement: &id002 !ruby/object:Gem::Requirement
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 1.3.2
31
+ - !ruby/object:Gem::Dependency
32
+ name: rake
33
+ requirement: !ruby/object:Gem::Requirement
32
34
  none: false
33
- requirements:
34
- - - ">="
35
- - !ruby/object:Gem::Version
36
- version: "0"
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
37
39
  type: :development
38
- version_requirements: *id002
39
- - !ruby/object:Gem::Dependency
40
- name: rdoc
41
40
  prerelease: false
42
- requirement: &id003 !ruby/object:Gem::Requirement
41
+ version_requirements: !ruby/object:Gem::Requirement
43
42
  none: false
44
- requirements:
45
- - - ">="
46
- - !ruby/object:Gem::Version
47
- version: "0"
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: rdoc
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
48
55
  type: :development
49
- version_requirements: *id003
50
- - !ruby/object:Gem::Dependency
51
- name: rspec-core
52
56
  prerelease: false
53
- requirement: &id004 !ruby/object:Gem::Requirement
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: rspec-core
65
+ requirement: !ruby/object:Gem::Requirement
54
66
  none: false
55
- requirements:
67
+ requirements:
56
68
  - - ~>
57
- - !ruby/object:Gem::Version
58
- version: "2.2"
69
+ - !ruby/object:Gem::Version
70
+ version: '2.2'
59
71
  type: :development
60
- version_requirements: *id004
61
- description: "Test your XML with Test::Unit, MiniTest, RSpec, or Cucumber using handy assertions like #assert_xml_equal or #assert_xml_structure_contain."
62
- email:
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ~>
77
+ - !ruby/object:Gem::Version
78
+ version: '2.2'
79
+ description: ! 'Test your XML with Test::Unit, MiniTest, RSpec, or Cucumber using
80
+ handy assertions like #assert_xml_equal or #assert_xml_structure_contain.'
81
+ email:
63
82
  - alovak@gmail.com
64
83
  - apotonick@gmail.com
65
84
  executables: []
66
-
67
85
  extensions: []
68
-
69
- extra_rdoc_files:
86
+ extra_rdoc_files:
70
87
  - README.rdoc
71
- files:
88
+ files:
72
89
  - .gitignore
90
+ - CHANGES.md
73
91
  - Gemfile
74
- - Gemfile.lock
75
92
  - README.rdoc
76
93
  - Rakefile
77
94
  - lib/test_xml.rb
95
+ - lib/test_xml/assertions.rb
78
96
  - lib/test_xml/matcher_methods.rb
79
97
  - lib/test_xml/mini_test.rb
80
98
  - lib/test_xml/nokogiri.rb
81
99
  - lib/test_xml/nokogiri/node.rb
82
100
  - lib/test_xml/spec.rb
83
- - lib/test_xml/spec/matchers.rb
84
- - lib/test_xml/spec/matchers/contain_xml.rb
85
- - lib/test_xml/spec/matchers/contain_xml_structure.rb
86
- - lib/test_xml/spec/matchers/equal_xml.rb
87
- - lib/test_xml/spec/matchers/equal_xml_structure.rb
88
101
  - lib/test_xml/test_unit.rb
89
102
  - lib/test_xml/test_unit/assertions.rb
90
103
  - lib/test_xml/version.rb
@@ -97,41 +110,30 @@ files:
97
110
  - test/test_helper.rb
98
111
  - test/test_unit/test_assertions.rb
99
112
  - test_xml.gemspec
100
- has_rdoc: true
101
113
  homepage: http://github.com/alovak/test_xml
102
114
  licenses: []
103
-
104
115
  post_install_message:
105
- rdoc_options:
116
+ rdoc_options:
106
117
  - --main
107
118
  - README.rdoc
108
- require_paths:
119
+ require_paths:
109
120
  - lib
110
- required_ruby_version: !ruby/object:Gem::Requirement
121
+ required_ruby_version: !ruby/object:Gem::Requirement
111
122
  none: false
112
- requirements:
113
- - - ">="
114
- - !ruby/object:Gem::Version
115
- version: "0"
116
- required_rubygems_version: !ruby/object:Gem::Requirement
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ required_rubygems_version: !ruby/object:Gem::Requirement
117
128
  none: false
118
- requirements:
119
- - - ">="
120
- - !ruby/object:Gem::Version
121
- version: "0"
129
+ requirements:
130
+ - - ! '>='
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
122
133
  requirements: []
123
-
124
134
  rubyforge_project:
125
- rubygems_version: 1.6.2
135
+ rubygems_version: 1.8.25
126
136
  signing_key:
127
137
  specification_version: 3
128
138
  summary: Test your XML with Test::Unit, MiniTest, RSpec, or Cucumber.
129
- test_files:
130
- - spec/matchers/contain_xml_spec.rb
131
- - spec/matchers/contain_xml_structure_spec.rb
132
- - spec/matchers/equal_xml_spec.rb
133
- - spec/matchers/equal_xml_structure_spec.rb
134
- - spec/spec_helper.rb
135
- - test/nokogiri/test_node.rb
136
- - test/test_helper.rb
137
- - test/test_unit/test_assertions.rb
139
+ test_files: []
@@ -1,31 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- test_xml (0.1.1)
5
- nokogiri (>= 1.3.2)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- diff-lcs (1.1.2)
11
- nokogiri (1.4.4)
12
- rake (0.8.7)
13
- rdoc (3.5.3)
14
- rspec (2.5.0)
15
- rspec-core (~> 2.5.0)
16
- rspec-expectations (~> 2.5.0)
17
- rspec-mocks (~> 2.5.0)
18
- rspec-core (2.5.1)
19
- rspec-expectations (2.5.0)
20
- diff-lcs (~> 1.1.2)
21
- rspec-mocks (2.5.0)
22
-
23
- PLATFORMS
24
- ruby
25
-
26
- DEPENDENCIES
27
- rake
28
- rdoc
29
- rspec (>= 2.2)
30
- rspec-core (~> 2.2)
31
- test_xml!
@@ -1,5 +0,0 @@
1
- require 'test_xml/matcher_methods'
2
- require 'test_xml/spec/matchers/contain_xml'
3
- require 'test_xml/spec/matchers/contain_xml_structure'
4
- require 'test_xml/spec/matchers/equal_xml_structure'
5
- require 'test_xml/spec/matchers/equal_xml'
@@ -1,13 +0,0 @@
1
- RSpec::Matchers.define :contain_xml do |expected|
2
- match do |actual|
3
- TestXml::MatcherMethods.xml_contain(actual, expected)
4
- end
5
-
6
- failure_message_for_should do |actual|
7
- "the xml:\n#{actual}\nshould match xml:\n#{expected}"
8
- end
9
-
10
- failure_message_for_should_not do |actual|
11
- "the xml:\n#{actual}\nshould not match xml:\n#{expected}\nbut it does"
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- RSpec::Matchers.define :contain_xml_structure do |expected|
2
- match do |actual|
3
- TestXml::MatcherMethods.xml_structure_contain(actual, expected)
4
- end
5
-
6
- failure_message_for_should do |actual|
7
- "the xml:\n#{actual}\nshould match xml structure:\n#{expected}"
8
- end
9
-
10
- failure_message_for_should_not do |actual|
11
- "the xml:\n#{actual}\nshould not match xml structure:\n#{expected}\nbut it does"
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- RSpec::Matchers.define :equal_xml do |expected|
2
- match do |actual|
3
- TestXml::MatcherMethods.xml_equal(actual, expected)
4
- end
5
-
6
- failure_message_for_should do |actual|
7
- "the xml:\n#{actual}\nshould exactly match xml:\n#{expected}"
8
- end
9
-
10
- failure_message_for_should_not do |actual|
11
- "the xml:\n#{actual}\nshould not exactly match xml:\n#{expected}\nbut it does"
12
- end
13
- end
@@ -1,13 +0,0 @@
1
- RSpec::Matchers.define :equal_xml_structure do |expected|
2
- match do |actual|
3
- TestXml::MatcherMethods.xml_structure_equal(actual, expected)
4
- end
5
-
6
- failure_message_for_should do |actual|
7
- "the xml:\n#{actual}\nshould exactly match xml structure:\n#{expected}"
8
- end
9
-
10
- failure_message_for_should_not do |actual|
11
- "the xml:\n#{actual}\nshould not exactly match xml structure:\n#{expected}\nbut it does"
12
- end
13
- end