Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Align describe snippets with it snippets for consistency. #12

Closed
wants to merge 1 commit into from

4 participants

@rexikan

Removed should from describe-snippets.

Benefits:

  • Describe snippets produce same it block as the it snippet.
  • Supports both it "should do something" and it "does something" styles.
@barneywilliams

I don't think I agree with removing the 'should' completely. It would be better to replace 'description' with 'should' instead. That way, you can just start typing 'does' when in that field of the snippet it active and highlighted, then it will just be replaced. Hopefully my assumption that the tmSnippets work like the native Sublime snippets wrt to the field behavior and defaulting...

Also, I think it is an incorrect assumption that the description for the describe and it statement should be the same format. They server different purposes, and defaulting to 'should' for the start of the 'it' description pushed for good BDD by reminding the developer that they are describing a behavior.

It would probably be best at some point to convert these all to Sublime native snippets, but these old TM snippets do the trick for now.

Thanks for the contributions!

My reason for removing "should" is that I follow the style of it "does something" instead of it "should do something". No big deal though.

@olivierlacan

@barneywilliams This PR should be closed, this has been addressed properly:

image

@princemaple
Collaborator

Thank you @rexikan and @olivierlacan !

@princemaple princemaple closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
2  Snippets/Describe.tmSnippet
@@ -4,7 +4,7 @@
<dict>
<key>content</key>
<string>describe "${1:description}" do
- it "should ${2:description}" do
+ it "${2:description}" do
$0
end
end</string>
View
2  Snippets/Describe_type.tmSnippet
@@ -4,7 +4,7 @@
<dict>
<key>content</key>
<string>describe ${1:Type} do
- it "should ${2:description}" do
+ it "${2:description}" do
$0
end
end</string>
View
2  Snippets/Describe_type_string.tmSnippet
@@ -4,7 +4,7 @@
<dict>
<key>content</key>
<string>describe ${1:Type}, "${2:description}" do
- it "should ${3:description}" do
+ it "${3:description}" do
$0
end
end</string>
Something went wrong with that request. Please try again.