Skip to content

Instantly share code, notes, and snippets.

@agibralter
Created October 7, 2008 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agibralter/15322 to your computer and use it in GitHub Desktop.
Save agibralter/15322 to your computer and use it in GitHub Desktop.
{ scopeName = 'source.ruby.cucumber.steps';
fileTypes = ( 'steps.rb' );
patterns = (
{ name = 'keyword';
match = '\b(GivenScenario|Given|When|Then)\b';
},
{ name = 'string.regexp.classic.ruby';
begin = '(?:GivenScenario\s)|(?:Given\s)|(?:When\s)|(?:Then\s)\s*((/))(?![*+{}?])';
end = '((/[eimnosux]*))';
},
{ include = 'source.ruby'; },
);
}
{ name = 'string.regexp.classic.ruby';
begin = '((?:GivenScenario\s)|(?:Given\s)|(?:When\s)|(?:Then\s))\s*((/))(?![*+{}?])';
end = '((/[eimnosux]*))';
beginCapture = {
1 = {name = 'keyword'};
}
},
# The regex here in textmate is not recognized
Given /^a user (\w+)$/ do |login|
Factory :user, :login => login if !User.find_by_login(login)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment