minitest_should 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -39,9 +39,9 @@ As usual, just use the `gem install` command:
39
39
 
40
40
  (sudo) gem install minitest_should
41
41
 
42
- Or add wordy as a gem in your Gemfile:
42
+ Or add minitest_should as a gem in your Gemfile:
43
43
 
44
- gem 'minitest_should', '~> 0.1.0'
44
+ gem 'minitest_should', '~> 0.1.1'
45
45
 
46
46
  Then run `bundle install`
47
47
 
@@ -58,6 +58,9 @@ Testing is done with minitest. Run the tests with:
58
58
  Changelog
59
59
  ---------
60
60
 
61
+ **2011/11/8 - v0.1.1**
62
+ - ensure dynamic methods have save names
63
+
61
64
  **2011/11/8 - v0.1.0**
62
65
  - it exists!
63
66
 
@@ -9,7 +9,7 @@ module MiniTest
9
9
  module ClassMethods
10
10
 
11
11
  def should(name, &block)
12
- method_name = [ "test_should_", name.downcase.gsub(/\s+/, '_') ].join
12
+ method_name = [ "test_should_", name.downcase.gsub(/[^a-z0-9\_\s]+/, ' ').strip.gsub(/\s+/, "_") ].join
13
13
  if self.test_methods.include?(method_name)
14
14
  raise MiniTest::Should::DuplicateMethodError, "Test named `#{method_name}` already exists in #{self.name}."
15
15
  else
@@ -1,5 +1,5 @@
1
1
  module MiniTest
2
2
  module Should
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
@@ -32,6 +32,14 @@ class TestMiniTestShould < MiniTest::Unit::TestCase
32
32
  assert self.class.test_methods.include?("test_should_create_method_from_string")
33
33
  end
34
34
 
35
+ should "allow-crazy! @characters..." do
36
+ assert self.class.test_methods.include?("test_should_allow_crazy_characters")
37
+ end
38
+
39
+ should "4 * 4 = 12" do #deadmau5
40
+ assert self.class.test_methods.include?("test_should_4_4_12")
41
+ end
42
+
35
43
  should "work with multiple assertions" do
36
44
  assert_block do
37
45
  1 == 2 / 2
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: minitest_should
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.0
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Spencer Steffen
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-11-08 00:00:00 Z
13
+ date: 2011-11-09 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake