etest 0.4 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 0.4
1
+ 0.4.1
2
2
 
data/etest.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{etest}
5
- s.version = "0.4"
5
+ s.version = "0.4.1"
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"]
9
- s.date = %q{2010-05-23}
9
+ s.date = %q{2010-06-13}
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"]
@@ -15,14 +15,14 @@ Gem::Specification.new do |s|
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Etest"]
16
16
  s.require_paths = ["lib"]
17
17
  s.rubyforge_project = %q{etest}
18
- s.rubygems_version = %q{1.3.6}
18
+ s.rubygems_version = %q{1.3.7}
19
19
  s.summary = %q{Embedded testing}
20
20
 
21
21
  if s.respond_to? :specification_version then
22
22
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
23
23
  s.specification_version = 3
24
24
 
25
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
25
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
26
26
  else
27
27
  end
28
28
  else
@@ -2,6 +2,19 @@
2
2
  #
3
3
  # Some assertions
4
4
  module Etest::Assertions
5
+ #
6
+ # regex matching
7
+ #
8
+ def assert_matches(actual, pattern)
9
+ assert actual =~ pattern, "#{actual.truncate(32).inspect} should match #{pattern.inspect}, but doesn't."
10
+ end
11
+
12
+ def assert_no_match(actual, pattern)
13
+ return unless actual =~ pattern
14
+ assert actual !~ pattern, "#{actual.truncate(32).inspect} should not match #{pattern.inspect}, but does."
15
+ end
16
+
17
+ #
5
18
  def assert_not_equal(unexpected, actual)
6
19
  assert unexpected != actual, "#{actual} equals #{unexpected}, when it shouldn't"
7
20
  end
data/lib/etest.rb CHANGED
@@ -1,5 +1,3 @@
1
- require "rubygems"
2
-
3
1
  begin
4
2
  require "minitest-rg"
5
3
  rescue LoadError
data/test/test.rb CHANGED
@@ -6,13 +6,13 @@ ETEST_TEST=true
6
6
 
7
7
  #
8
8
  # initialize the gem
9
+ require "rubygems"
9
10
  require '../init'
10
11
 
11
12
  require "#{DIRNAME}/etest_assertions.rb"
12
13
  require "#{DIRNAME}/etest_string.rb"
13
14
 
14
15
  require 'logger'
15
- require 'rubygems'
16
16
  require 'ruby-debug'
17
17
 
18
18
  LOGFILE = "log/test.log"
metadata CHANGED
@@ -1,11 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: etest
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 13
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 4
8
- version: "0.4"
9
+ - 1
10
+ version: 0.4.1
9
11
  platform: ruby
10
12
  authors:
11
13
  - pboy
@@ -13,7 +15,7 @@ autorequire:
13
15
  bindir: bin
14
16
  cert_chain: []
15
17
 
16
- date: 2010-05-23 00:00:00 +02:00
18
+ date: 2010-06-13 00:00:00 +02:00
17
19
  default_executable:
18
20
  dependencies: []
19
21
 
@@ -65,16 +67,20 @@ rdoc_options:
65
67
  require_paths:
66
68
  - lib
67
69
  required_ruby_version: !ruby/object:Gem::Requirement
70
+ none: false
68
71
  requirements:
69
72
  - - ">="
70
73
  - !ruby/object:Gem::Version
74
+ hash: 3
71
75
  segments:
72
76
  - 0
73
77
  version: "0"
74
78
  required_rubygems_version: !ruby/object:Gem::Requirement
79
+ none: false
75
80
  requirements:
76
81
  - - ">="
77
82
  - !ruby/object:Gem::Version
83
+ hash: 11
78
84
  segments:
79
85
  - 1
80
86
  - 2
@@ -82,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
88
  requirements: []
83
89
 
84
90
  rubyforge_project: etest
85
- rubygems_version: 1.3.6
91
+ rubygems_version: 1.3.7
86
92
  signing_key:
87
93
  specification_version: 3
88
94
  summary: Embedded testing