Skip to content

Instantly share code, notes, and snippets.

@markalfred
Created October 29, 2013 19:46
Show Gist options
  • Save markalfred/7221299 to your computer and use it in GitHub Desktop.
Save markalfred/7221299 to your computer and use it in GitHub Desktop.
Cucumber Step Templates for Sublime Text
<snippet>
<content><![CDATA[
Given(/^${1:Something called}${2: "(.*?)"}${3: does something}\$/) do |${4:variable_name}|
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>given-variable step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
Given(/^${1:Something happened}\$/) do
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>given step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
Then(/^${1:Something called}${2: "(.*?)"}${3: should do something}\$/) do |${4:variable_name}|
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>then-variable step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
Then(/^${1:Something called}${2: "(.*?)"}${3: should do something like}${4: "(.*?)"}\$/) do |${5:first_variable}${6:, second_variable}|
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>then-variable-variable step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
Then(/^${1:Something should happen}\$/) do
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>then step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
When(/^${1:Something called}${2: "(.*?)"}${3: does something}\$/) do |${4:variable_name}|
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>when-variable step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
<snippet>
<content><![CDATA[
When(/^${1:Something happens}\$/) do
${0:}
end
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>when step</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment