test_xml 0.0.4 → 0.1.0

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.
Files changed (30) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile +8 -0
  3. data/Gemfile.lock +31 -0
  4. data/README.rdoc +56 -73
  5. data/Rakefile +12 -12
  6. data/lib/test_xml.rb +0 -2
  7. data/lib/test_xml/matcher_methods.rb +29 -0
  8. data/lib/test_xml/mini_test.rb +6 -0
  9. data/lib/test_xml/nokogiri/node.rb +13 -8
  10. data/lib/test_xml/spec.rb +1 -4
  11. data/lib/test_xml/spec/matchers.rb +5 -4
  12. data/lib/test_xml/spec/matchers/{match_xml.rb → contain_xml.rb} +2 -7
  13. data/lib/test_xml/spec/matchers/{match_xml_structure.rb → contain_xml_structure.rb} +2 -5
  14. data/lib/test_xml/spec/matchers/{exactly_match_xml.rb → equal_xml.rb} +2 -7
  15. data/lib/test_xml/spec/matchers/{exactly_match_xml_structure.rb → equal_xml_structure.rb} +2 -4
  16. data/lib/test_xml/test_unit.rb +2 -0
  17. data/lib/test_xml/test_unit/assertions.rb +29 -32
  18. data/lib/test_xml/version.rb +1 -1
  19. data/spec/{lib/test_xml/spec/matchers/match_xml_spec.rb → matchers/contain_xml_spec.rb} +5 -5
  20. data/spec/{lib/test_xml/spec/matchers/match_xml_structure_spec.rb → matchers/contain_xml_structure_spec.rb} +4 -4
  21. data/spec/{lib/test_xml/spec/matchers/exactly_match_xml_spec.rb → matchers/equal_xml_spec.rb} +6 -4
  22. data/spec/{lib/test_xml/spec/matchers/exactly_match_xml_structure_spec.rb → matchers/equal_xml_structure_spec.rb} +4 -4
  23. data/spec/spec.opts +2 -0
  24. data/spec/spec_helper.rb +1 -4
  25. data/test/{test_xml/nokogiri → nokogiri}/test_node.rb +14 -7
  26. data/test/test_helper.rb +1 -4
  27. data/test/test_unit/test_assertions.rb +227 -0
  28. data/test_xml.gemspec +28 -0
  29. metadata +77 -42
  30. data/test/test_xml/test_unit/test_assertions.rb +0 -159
metadata CHANGED
@@ -1,21 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_xml
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
6
- segments:
7
- - 0
8
- - 0
9
- - 4
10
- version: 0.0.4
4
+ prerelease:
5
+ version: 0.1.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Pavel Gabriel
9
+ - Nick Sutterer
14
10
  autorequire:
15
11
  bindir: bin
16
12
  cert_chain: []
17
13
 
18
- date: 2010-10-15 00:00:00 +03:00
14
+ date: 2011-04-15 00:00:00 +03:00
19
15
  default_executable:
20
16
  dependencies:
21
17
  - !ruby/object:Gem::Dependency
@@ -26,16 +22,46 @@ dependencies:
26
22
  requirements:
27
23
  - - ">="
28
24
  - !ruby/object:Gem::Version
29
- hash: 31
30
- segments:
31
- - 1
32
- - 3
33
- - 2
34
25
  version: 1.3.2
35
26
  type: :runtime
36
27
  version_requirements: *id001
37
- description: test_xml allows you to test xml (match stucture and values) with RSpec, Test::Unit, Cucumber
38
- email: alovak@gmail.com
28
+ - !ruby/object:Gem::Dependency
29
+ name: rake
30
+ prerelease: false
31
+ requirement: &id002 !ruby/object:Gem::Requirement
32
+ none: false
33
+ requirements:
34
+ - - ">="
35
+ - !ruby/object:Gem::Version
36
+ version: "0"
37
+ type: :development
38
+ version_requirements: *id002
39
+ - !ruby/object:Gem::Dependency
40
+ name: rdoc
41
+ prerelease: false
42
+ requirement: &id003 !ruby/object:Gem::Requirement
43
+ none: false
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: "0"
48
+ type: :development
49
+ version_requirements: *id003
50
+ - !ruby/object:Gem::Dependency
51
+ name: rspec-core
52
+ prerelease: false
53
+ requirement: &id004 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ version: "2.2"
59
+ 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:
63
+ - alovak@gmail.com
64
+ - apotonick@gmail.com
39
65
  executables: []
40
66
 
41
67
  extensions: []
@@ -43,28 +69,35 @@ extensions: []
43
69
  extra_rdoc_files:
44
70
  - README.rdoc
45
71
  files:
46
- - lib/test_xml/nokogiri/node.rb
72
+ - .gitignore
73
+ - Gemfile
74
+ - Gemfile.lock
75
+ - README.rdoc
76
+ - Rakefile
77
+ - lib/test_xml.rb
78
+ - lib/test_xml/matcher_methods.rb
79
+ - lib/test_xml/mini_test.rb
47
80
  - lib/test_xml/nokogiri.rb
48
- - lib/test_xml/spec/matchers/exactly_match_xml.rb
49
- - lib/test_xml/spec/matchers/exactly_match_xml_structure.rb
50
- - lib/test_xml/spec/matchers/match_xml.rb
51
- - lib/test_xml/spec/matchers/match_xml_structure.rb
52
- - lib/test_xml/spec/matchers.rb
81
+ - lib/test_xml/nokogiri/node.rb
53
82
  - lib/test_xml/spec.rb
54
- - lib/test_xml/test_unit/assertions.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
55
88
  - lib/test_xml/test_unit.rb
89
+ - lib/test_xml/test_unit/assertions.rb
56
90
  - lib/test_xml/version.rb
57
- - lib/test_xml.rb
58
- - test/test_helper.rb
59
- - test/test_xml/nokogiri/test_node.rb
60
- - test/test_xml/test_unit/test_assertions.rb
61
- - spec/lib/test_xml/spec/matchers/exactly_match_xml_spec.rb
62
- - spec/lib/test_xml/spec/matchers/exactly_match_xml_structure_spec.rb
63
- - spec/lib/test_xml/spec/matchers/match_xml_spec.rb
64
- - spec/lib/test_xml/spec/matchers/match_xml_structure_spec.rb
91
+ - spec/matchers/contain_xml_spec.rb
92
+ - spec/matchers/contain_xml_structure_spec.rb
93
+ - spec/matchers/equal_xml_spec.rb
94
+ - spec/matchers/equal_xml_structure_spec.rb
95
+ - spec/spec.opts
65
96
  - spec/spec_helper.rb
66
- - Rakefile
67
- - README.rdoc
97
+ - test/nokogiri/test_node.rb
98
+ - test/test_helper.rb
99
+ - test/test_unit/test_assertions.rb
100
+ - test_xml.gemspec
68
101
  has_rdoc: true
69
102
  homepage: http://github.com/alovak/test_xml
70
103
  licenses: []
@@ -80,25 +113,27 @@ required_ruby_version: !ruby/object:Gem::Requirement
80
113
  requirements:
81
114
  - - ">="
82
115
  - !ruby/object:Gem::Version
83
- hash: 3
84
- segments:
85
- - 0
86
116
  version: "0"
87
117
  required_rubygems_version: !ruby/object:Gem::Requirement
88
118
  none: false
89
119
  requirements:
90
120
  - - ">="
91
121
  - !ruby/object:Gem::Version
92
- hash: 3
93
- segments:
94
- - 0
95
122
  version: "0"
96
123
  requirements: []
97
124
 
98
125
  rubyforge_project:
99
- rubygems_version: 1.3.7
126
+ rubygems_version: 1.6.2
100
127
  signing_key:
101
128
  specification_version: 3
102
- summary: test_xml allows you to test xml with RSpec, Test::Unit, Cucumber
103
- test_files: []
104
-
129
+ summary: Test your XML with Test::Unit, MiniTest, RSpec, or Cucumber.
130
+ test_files:
131
+ - spec/matchers/contain_xml_spec.rb
132
+ - spec/matchers/contain_xml_structure_spec.rb
133
+ - spec/matchers/equal_xml_spec.rb
134
+ - spec/matchers/equal_xml_structure_spec.rb
135
+ - spec/spec.opts
136
+ - spec/spec_helper.rb
137
+ - test/nokogiri/test_node.rb
138
+ - test/test_helper.rb
139
+ - test/test_unit/test_assertions.rb
@@ -1,159 +0,0 @@
1
- require 'test_helper'
2
-
3
- class TestAssertions < Test::Unit::TestCase
4
- def test_assert_match_xml
5
- xml = <<-XML
6
- <root>
7
- <one>1</one>
8
- <two>2</two>
9
- </root>
10
- XML
11
-
12
- assert_match_xml(xml) do
13
- <<-XML
14
- <root>
15
- <one>1</one>
16
- </root>
17
- XML
18
- end
19
- end
20
-
21
- def test_assert_not_match_xml
22
- xml = <<-XML
23
- <root>
24
- <one>1</one>
25
- </root>
26
- XML
27
-
28
- assert_not_match_xml(xml) do
29
- <<-XML
30
- <root>
31
- <one>2</one>
32
- </root>
33
- XML
34
- end
35
- end
36
-
37
- def test_assert_match_xml_structure
38
- xml = <<-XML
39
- <root>
40
- <one>1</one>
41
- <two>
42
- <three>3</three>
43
- </two>
44
- </root>
45
- XML
46
-
47
- assert_match_xml_structure(xml) do
48
- <<-XML
49
- <root>
50
- <one>2</one>
51
- <two>
52
- <three>4</three>
53
- </two>
54
- </root>
55
- XML
56
- end
57
- end
58
-
59
- def test_assert_not_match_xml_structure
60
- xml = <<-XML
61
- <root>
62
- <one>1</one>
63
- <two>
64
- <three>3</three>
65
- </two>
66
- </root>
67
- XML
68
-
69
- assert_not_match_xml_structure(xml) do
70
- <<-XML
71
- <root>
72
- <one>2</one>
73
- <two>
74
- <four/>
75
- </two>
76
- </root>
77
- XML
78
- end
79
- end
80
-
81
- def test_assert_exactly_match_xml
82
- xml = <<-XML
83
- <root>
84
- <one>1</one>
85
- <two>2</two>
86
- </root>
87
- XML
88
-
89
- assert_exactly_match_xml(xml) do
90
- <<-XML
91
- <root>
92
- <one>1</one>
93
- <two>2</two>
94
- </root>
95
- XML
96
- end
97
- end
98
-
99
- def test_assert_not_exactly_match_xml
100
- xml = <<-XML
101
- <root>
102
- <one>1</one>
103
- <two>2</two>
104
- </root>
105
- XML
106
-
107
- assert_not_exactly_match_xml(xml) do
108
- <<-XML
109
- <root>
110
- <one>1</one>
111
- </root>
112
- XML
113
- end
114
- end
115
- def test_assert_exactly_match_xml_structure
116
- xml = <<-XML
117
- <root>
118
- <one>1</one>
119
- <two>
120
- <three>3</three>
121
- </two>
122
- </root>
123
- XML
124
-
125
- assert_exactly_match_xml_structure(xml) do
126
- <<-XML
127
- <root>
128
- <one>2</one>
129
- <two>
130
- <three>4</three>
131
- </two>
132
- </root>
133
- XML
134
- end
135
- end
136
-
137
- def test_assert_not_exactly_match_xml_structure
138
- xml = <<-XML
139
- <root>
140
- <one>1</one>
141
- <two>
142
- <three>3</three>
143
- </two>
144
- </root>
145
- XML
146
-
147
- assert_not_match_xml_structure(xml) do
148
- <<-XML
149
- <root>
150
- <one>2</one>
151
- <two>
152
- <three>3</three>
153
- <four/>
154
- </two>
155
- </root>
156
- XML
157
- end
158
- end
159
- end