Skip to content

Commit

Permalink
Fixed bug with context names
Browse files Browse the repository at this point in the history
  • Loading branch information
soveran committed Mar 24, 2009
1 parent 0927390 commit 77f3a2b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions contest.gemspec
@@ -1,9 +1,9 @@
Gem::Specification.new do |s|
s.name = 'contest'
s.version = '0.0.5'
s.version = '0.0.6'
s.summary = %{Write more readable tests in Test::Unit with this tiny script.}
s.date = %q{2009-03-16}
s.author = "Damian Janowski"
s.authors = ["Damian Janowski", "Michel Martens"]
s.email = "damian.janowski@gmail.com"
s.homepage = "http://github.com/citrusbyte/contest"

Expand Down
4 changes: 2 additions & 2 deletions contest.gemspec.erb
@@ -1,9 +1,9 @@
Gem::Specification.new do |s|
s.name = 'contest'
s.version = '0.0.5'
s.version = '0.0.6'
s.summary = %{Write more readable tests in Test::Unit with this tiny script.}
s.date = %q{2009-03-16}
s.author = "Damian Janowski"
s.authors = ["Damian Janowski", "Michel Martens"]
s.email = "damian.janowski@gmail.com"
s.homepage = "http://github.com/citrusbyte/contest"

Expand Down
2 changes: 1 addition & 1 deletion lib/contest.rb
Expand Up @@ -57,6 +57,6 @@ def self.test_name(name)
end

def self.sanitize_name(name)
name.gsub(/\W+/, ' ')
name.gsub(/\W+/, ' ').strip
end
end
9 changes: 8 additions & 1 deletion test/all_test.rb
Expand Up @@ -9,7 +9,10 @@ class FooTest < Test::Unit::TestCase
assert_equal 1, @value
end

context "context's non-word characters" do
context "context's non-word characters " do
should "run the test inside" do
assert_equal 1, @value
end
end

context "some context" do
Expand Down Expand Up @@ -66,5 +69,9 @@ class BarTest < Test::Unit::TestCase
test "another truth" do
assert_equal 2, @value
end

test "another truth" do
assert_equal 2, @value
end
end
end

0 comments on commit 77f3a2b

Please sign in to comment.