Groovy/Grails Snippet errors
Reported by ronin-144397 (at lighthouseapp) | April 13th, 2011 @ 11:58 AM
I don't know if it is a bug of Redcar at all, but:
When I type 'mf' and press TAB, the MockFor snippet is called. (Groovy/Grails->Testing)
But the output is broken:
void testSomething() {
def mockControl = mockFor(ClassName) mockControl
.demand.yourMethod(1..1) = {->
} def testClassName = mockControl.createMock() }
Then I have to fix the generated code manually every time I use the snippet.
Comments and changes to this ticket
-
ronin-144397 (at lighthouseapp) April 13th, 2011 @ 12:18 PM
It should be:
def mockControl = mockFor(ClassName)
mockControl.demand.yourMethod(1..1) { ->} def testClassName = mockControl.createMock()
-
ronin-144397 (at lighthouseapp) April 13th, 2011 @ 12:19 PM
Please exclude the "void testSomething" and the trailing "}" in the first post, it was the test method and is not part of code generated by snippet.
-
delisa April 13th, 2011 @ 01:29 PM
- Tag set to grails, groovy, snippet, tmbundle
- Assigned user set to delisa
Its actually in the TextMate groovy/grails bundle. https://github.com/redcar/redcar-bundles/tree/master/Bundles/Groovy...
I've been meaning to fix or update a lot of the grails snippets, as they are a bit outdated, or just syntactically off. Do you mind posting any other grails snippet errors you find in this thread? -
delisa April 13th, 2011 @ 01:47 PM
- State changed from new to open
-
ronin-144397 (at lighthouseapp) April 13th, 2011 @ 03:04 PM
I'll post other snippets issues here, of course, if it will help to fix them. :D
-
delisa April 13th, 2011 @ 03:10 PM
- Title changed from MockFor Snippet to Groovy/Grails Snippet errors
Awesome, thanks!
-
ronin-144397 (at lighthouseapp) April 14th, 2011 @ 02:46 AM
Class snippet (cl) also it's obsolete:
class extends Parent implements Interface {
}
Could be:
class ClassName extends Parent implements Interface {
}
Regards!
-
ronin-144397 (at lighthouseapp) April 14th, 2011 @ 02:51 AM
I have noticed that HTML here in lighthouse is masking some issue in code I posted here, like > that is showed in mockFor snippet and here not.
In Class snippet, actual has many blank unnecessary lines inside a class, and hasn't a ClassName to be replaced.
If there is a <code> tag or something like that... Otherwise I'll try to escape some chars with \.
-
delisa April 14th, 2011 @ 01:07 PM
Lighthouse supports some textile-like syntax, though apparently now they also support markdown (thank goodness!), so <code> or @@@ away! http://help.lighthouseapp.com/kb/getting-started/how-do-i-format-text
-
delisa November 6th, 2011 @ 10:32 PM
- State changed from open to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A programmer's text editor for Gnome.