yamltest 0.5.2 → 0.5.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,7 +1,12 @@
1
+ == yamltest 0.5.3 2009-06-17
2
+
3
+ * 1 minor improvement
4
+ * Added support for spaces in method names
5
+
1
6
  == yamltest 0.5.2 2009-05-28
2
7
 
3
8
  * 1 minor improvement
4
- * Added an option to disable generating 'src' from the test tile
9
+ * Added an option to disable generating 'src' from the test title
5
10
 
6
11
  == yamltest 0.5.1 2009-02-02
7
12
 
@@ -3,7 +3,7 @@ module Yamltest
3
3
 
4
4
  MAJOR = 0
5
5
  MINOR = 5
6
- TINY = 1
6
+ TINY = 3
7
7
 
8
8
  def self.to_s # :nodoc:
9
9
  [MAJOR, MINOR, TINY].join('.')
data/lib/yamltest.rb CHANGED
@@ -5,7 +5,7 @@ $:.unshift(File.dirname(__FILE__)) unless
5
5
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
6
6
 
7
7
  module Yamltest
8
- VERSION = '0.5.2'
8
+ VERSION = '0.5.3'
9
9
  module Helper
10
10
  def self.included(obj)
11
11
  obj.extend Yamltest::ClassMethods
@@ -70,6 +70,11 @@ module Yamltest
70
70
  def yamltest(opts = {})
71
71
  # We need to do a class_eval so that the class variables 'test_strings, test_methods, ...' are scoped
72
72
  # in the final class and are not global to all tests using the YamlTest helper.
73
+ # TODO: we could use the singleton accessor:
74
+ # class << self
75
+ # attr_accessor test_strings
76
+ # end
77
+ # and then use "self.test_strings"
73
78
 
74
79
  class_eval %Q{
75
80
  @@test_strings = {}
@@ -149,7 +154,7 @@ module Yamltest
149
154
  unless tests.include?("test_#{tf}_#{test}")
150
155
  tests << "test_#{tf}_#{test}"
151
156
  class_eval <<-END
152
- def test_#{tf}_#{test}
157
+ def test_#{tf}_#{test.gsub(/[^_a-zA-Z]/, '_')}
153
158
  yt_do_test(#{tf.inspect}, #{test.inspect})
154
159
  end
155
160
  END
@@ -14,3 +14,7 @@ overwrite_key_replaces_hash:
14
14
  login: 'Marc'
15
15
  src: "context.inspect"
16
16
  res: '{"env" => {"login" => "Marc"}, "one" => 1, "two" => 2}'
17
+
18
+ "should support spaces in methods":
19
+ src: "45 + 2"
20
+ res: 47
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamltest
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gaspard Bucher
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-05-28 00:00:00 +02:00
12
+ date: 2009-06-18 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15