keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

GMock cannot handle test names with spaces or punctuation #105

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a test 'With a test name which has spaces or punctuation'
2. add a play { ... } block
3. The runner falls over because it can't find the closure created by play {} 
as it doesn't correctly handle spaces/punctuation when generating the closure 
name.

What is the expected output? What do you see instead?
I expect the tests to run without issue

What version of the product are you using? On what operating system?
GMock 0.8.1, Ubuntu 10.10

Please provide any additional information below.

Original issue reported on code.google.com by adjo...@gmail.com on 15 Feb 2011 at 12:21

GoogleCodeExporter commented 8 years ago
I remember it was a bug in the old versions of Groovy, but I try the following 
script in Groovy 1.7.7 and it passes. Seems the bug has been fixed.

@Grab(group='org.gmock', module='gmock', version='0.8.1')
import org.gmock.GMockTestCase
class Test extends GMockTestCase {
  void "test something"() {
    def m = mock()
    m.fun()
    play {
      m.fun()
    }
  }
}

Which version of Groovy are you using?

Original comment by JohnnyJianHY on 15 Feb 2011 at 4:29

GoogleCodeExporter commented 8 years ago
In about 3-4 hours, I will be using Groovy 1.7.8, so i'll try it then!

Currently Groovy 1.7.6

Original comment by adjo...@gmail.com on 15 Feb 2011 at 11:13

GoogleCodeExporter commented 8 years ago

Original comment by JohnnyJianHY on 25 Feb 2011 at 5:57