Help us understand the problem. What is going on with this article?

Sublime Text 2でスニペットを自作する

More than 5 years have passed since last update.

Tools > New Snippet...

it_should_allow_mass_assignment_of.sublime-snippet
<snippet>
  <content><![CDATA[
it { should allow_mass_assignment_of :${1:name} }
$0
]]></content>
  <tabTrigger>ism</tabTrigger>
  <scope>source.ruby.rspec</scope>
</snippet>

以下の場所に保存
/Users/user/Library/Application Support/Sublime Text 2/Packages/User/

scopeは必須ではない
スコープの取得は Sublime Text 2で現在のスコープを取得する

rspecのファイル内でism⇥で展開できる

should_notも作成

it_should_not_allow_mass_assignment_of.sublime-snippet
<snippet>
  <content><![CDATA[
it { should_not allow_mass_assignment_of :${1:name} }
$0
]]></content>
  <tabTrigger>isnm</tabTrigger>
  <scope>source.ruby.rspec</scope>
</snippet>
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away