etest 0.3.1 → 0.4

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.
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 0.3.1
1
+ 0.4
2
2
 
data/etest.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{etest}
5
- s.version = "0.3.1"
5
+ s.version = "0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["pboy"]
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.description = %q{Embedded testing}
11
11
  s.email = %q{eno-pboy@open-lab.org}
12
12
  s.extra_rdoc_files = ["lib/dlog_ext.rb", "lib/etest.rb", "lib/etest/assertions.rb", "lib/etest/comparison_assertions.rb", "lib/etest/grep.rb", "lib/module_ext.rb", "lib/string_ext.rb", "tasks/echoe.rake"]
13
- s.files = ["Manifest", "Rakefile", "VERSION", "gem.yml", "init.rb", "lib/dlog_ext.rb", "lib/etest.rb", "lib/etest/assertions.rb", "lib/etest/comparison_assertions.rb", "lib/etest/grep.rb", "lib/module_ext.rb", "lib/string_ext.rb", "script/console", "script/rebuild", "tasks/echoe.rake", "test/test.rb", "etest.gemspec"]
13
+ s.files = ["Manifest", "Rakefile", "VERSION", "gem.yml", "init.rb", "lib/dlog_ext.rb", "lib/etest.rb", "lib/etest/assertions.rb", "lib/etest/comparison_assertions.rb", "lib/etest/grep.rb", "lib/module_ext.rb", "lib/string_ext.rb", "script/console", "script/rebuild", "tasks/echoe.rake", "test/etest_assertions.rb", "test/etest_string.rb", "test/test.rb", "etest.gemspec"]
14
14
  s.homepage = %q{http://github.com/pboy/etest}
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Etest"]
16
16
  s.require_paths = ["lib"]
data/lib/etest.rb CHANGED
@@ -1,5 +1,12 @@
1
1
  require "rubygems"
2
- require "minitest/unit"
2
+
3
+ begin
4
+ require "minitest-rg"
5
+ rescue LoadError
6
+ STDERR.puts "'gem install minitest-rg' gives you redgreen minitests."
7
+ require "minitest/unit"
8
+ end
9
+
3
10
  require File.dirname(__FILE__) + "/string_ext"
4
11
  require File.dirname(__FILE__) + "/module_ext"
5
12
  require File.dirname(__FILE__) + "/dlog_ext"
@@ -0,0 +1,37 @@
1
+
2
+ module Etest::Assertions::Etest
3
+ #
4
+ # this actually tests the existance of an assertion and one successful
5
+ # assertion, nothing less, and nothing more...
6
+ def test_asserts
7
+ assert_respond_to "nsn", :upcase
8
+ assert respond_to?(:assert_invalid)
9
+ assert respond_to?(:assert_valid)
10
+ end
11
+
12
+ class TestError < RuntimeError; end
13
+
14
+ def test_assert_raises_kind_of
15
+ assert_raises_kind_of RuntimeError do
16
+ raise TestError
17
+ end
18
+ end
19
+
20
+ def test_assert_file_exist
21
+ assert_file_exist __FILE__
22
+ end
23
+
24
+ def test_xml
25
+ assert_valid_xml <<-XML
26
+ <root>
27
+ <p> lkhj </p>
28
+ </root>
29
+ XML
30
+
31
+ assert_invalid_xml <<-XML
32
+ <root>
33
+ <p> lkhj </p>
34
+ XML
35
+ end
36
+ end
37
+
@@ -0,0 +1,13 @@
1
+
2
+ module String::Etest
3
+ def test_camelize
4
+ assert_equal "x", "X".underscore
5
+ assert_equal "xa_la_nder", "XaLaNder".underscore
6
+ end
7
+
8
+ def test_underscore
9
+ assert_equal "X", "x".camelize
10
+ assert_equal "XaLaNder", "xa_la_nder".camelize
11
+ end
12
+ end
13
+
metadata CHANGED
@@ -4,9 +4,8 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 3
8
- - 1
9
- version: 0.3.1
7
+ - 4
8
+ version: "0.4"
10
9
  platform: ruby
11
10
  authors:
12
11
  - pboy
@@ -49,6 +48,8 @@ files:
49
48
  - script/console
50
49
  - script/rebuild
51
50
  - tasks/echoe.rake
51
+ - test/etest_assertions.rb
52
+ - test/etest_string.rb
52
53
  - test/test.rb
53
54
  - etest.gemspec
54
55
  has_rdoc: true