forked from scrooloose/snipmate-snippets
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
start converting to the snipmate format, still lots to do
- Loading branch information
Martin Grenfell
committed
Feb 18, 2009
1 parent
522e5ca
commit ba6fa12
Showing
112 changed files
with
234 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
assert_difference "<+Model+>.<+count+>", <+Model+> do | ||
<++> | ||
end | ||
<++> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
assert_no_difference "<+Model+>.<+count+>" do | ||
<++> | ||
end | ||
<++> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
def create | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.new(params[:\<c-r>=NS_underscore(snippet_classname)\<cr>]) | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.new(params[:\<c-r>=NS_underscore(snippet_classname)\<cr>]) | ||
|
||
respond_to do |wants| | ||
if @\<c-r>=NS_underscore(snippet_classname)\<cr>.save | ||
flash[:notice] = '\<c-r>=snippet_classname\<cr> was successfully created.' | ||
wants.html { redirect_to(@\<c-r>=NS_underscore(snippet_classname)\<cr>) } | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>, :status => :created, :location => @\<c-r>=NS_underscore(snippet_classname)\<cr> } | ||
else | ||
wants.html { render :action => "new" } | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>.errors, :status => :unprocessable_entity } | ||
end | ||
end | ||
respond_to do |wants| | ||
if @\<c-r>=NS_underscore(snippet_classname)\<cr>.save | ||
flash[:notice] = '\<c-r>=snippet_classname\<cr> was successfully created.' | ||
wants.html { redirect_to(@\<c-r>=NS_underscore(snippet_classname)\<cr>) } | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>, :status => :created, :location => @\<c-r>=NS_underscore(snippet_classname)\<cr> } | ||
else | ||
wants.html { render :action => "new" } | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>.errors, :status => :unprocessable_entity } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
def destroy | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
@\<c-r>=NS_underscore(snippet_classname)\<cr>.destroy | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
@\<c-r>=NS_underscore(snippet_classname)\<cr>.destroy | ||
|
||
respond_to do |wants| | ||
wants.html { redirect_to(\<c-r>=NS_underscore(snippet_classname)\<cr>s_url) } | ||
wants.xml { head :ok } | ||
end | ||
respond_to do |wants| | ||
wants.html { redirect_to(\<c-r>=NS_underscore(snippet_classname)\<cr>s_url) } | ||
wants.xml { head :ok } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def edit | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
def index | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.all | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.all | ||
|
||
respond_to do |wants| | ||
wants.html # index.html.erb | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>s } | ||
end | ||
respond_to do |wants| | ||
wants.html # index.html.erb | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>s } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
def new | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.new | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.new | ||
|
||
respond_to do |wants| | ||
wants.html # new.html.erb | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr> } | ||
end | ||
respond_to do |wants| | ||
wants.html # new.html.erb | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr> } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
def show | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
|
||
respond_to do |wants| | ||
wants.html # show.html.erb | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr> } | ||
end | ||
respond_to do |wants| | ||
wants.html # show.html.erb | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr> } | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
def update | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
@\<c-r>=NS_underscore(NS_prompt("snippet_classname", "Model ClassName", ""))\<cr> = \<c-r>=snippet_classname\<cr>.find(params[:id]) | ||
|
||
respond_to do |wants| | ||
if @\<c-r>=NS_underscore(snippet_classname)\<cr>.update_attributes(params[:\<c-r>=NS_underscore(snippet_classname)\<cr>]) | ||
flash[:notice] = '\<c-r>=snippet_classname\<cr> was successfully updated.' | ||
wants.html { redirect_to(@\<c-r>=NS_underscore(snippet_classname)\<cr>) } | ||
wants.xml { head :ok } | ||
else | ||
wants.html { render :action => "edit" } | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>.errors, :status => :unprocessable_entity } | ||
end | ||
end | ||
respond_to do |wants| | ||
if @\<c-r>=NS_underscore(snippet_classname)\<cr>.update_attributes(params[:\<c-r>=NS_underscore(snippet_classname)\<cr>]) | ||
flash[:notice] = '\<c-r>=snippet_classname\<cr> was successfully updated.' | ||
wants.html { redirect_to(@\<c-r>=NS_underscore(snippet_classname)\<cr>) } | ||
wants.xml { head :ok } | ||
else | ||
wants.html { render :action => "edit" } | ||
wants.xml { render :xml => @\<c-r>=NS_underscore(snippet_classname)\<cr>.errors, :status => :unprocessable_entity } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
<+map+>.with_options :<+controller+> => '<+thing+>' do |<+thing+>| | ||
<++> | ||
<++> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
create_table :<+table_name+> do |t| | ||
t.column :<+name+>, :<+type+> | ||
t.column :<+name+>, :<+type+> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
class \<c-r>=Snippet_MigrationNameFromFilename()\<cr> < ActiveRecord::Migration | ||
def self.up | ||
<++> | ||
end | ||
def self.up | ||
<++> | ||
end | ||
|
||
def self.down | ||
<++> | ||
end | ||
def self.down | ||
<++> | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
respond_to do |wants| | ||
wants.<+html+> <+{ <++> }+> | ||
wants.<+html+> <+{ <++> }+> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
render :update do |<+page+>| | ||
<+page+>.<++> | ||
end | ||
<+page+>.<++> | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
class \<c-r>=NS_prompt("snip_classname", "Model classname", "")\<cr>Sweeper < ActionController::Caching::Sweeper | ||
observe \<c-r>=snip_classname\<cr> | ||
observe \<c-r>=snip_classname\<cr> | ||
|
||
def after_save(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
end | ||
def after_save(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
end | ||
|
||
def after_destroy(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
end | ||
def after_destroy(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
end | ||
|
||
def expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
expire_page | ||
end | ||
def expire_cache(\<c-r>=NS_underscore(snip_classname)\<cr>) | ||
expire_page | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.boolean :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.binary :<+title+><+, :limit => <+2+>.megabytes+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.decimal :<+title+><+<+, :precision => <+10+>+><+, :scale => <+2+>+>+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.date :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.datetime :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.float :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.change :<+name+><+, :<+string+><+, :<+limit+> => <+80+>+>+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.integer :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.integer :lock_version, :null => false, :default => 0 | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.string :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.text :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.time :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.timestamp :<+title+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.timestamps | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
t.rename :<+old_column_name+>, :<+new_column_name+> | ||
<++> | ||
<++> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
File.open(<+"<+path+>.dump"+>, "wb") { |<+file+>| Marshal.dump(<+obj+>, <+file+>) } | ||
File.open(${1:dump_path}, "wb") { |${2:file}| Marshal.dump(${3:obj}, ${4:$2}) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
File.open(<+"<+path+>.dump"+>, "rb") { |<+file+>| Marshal.load(<+file+>) } | ||
File.open(${1:dump_path}, "rb") { |${2:file}| Marshal.load(${3:$2}) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
PStore.new(<+"<+file_name.pstore+>"+>) | ||
PStore.new(${1}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
File.open(<+"<+path+>.yaml"+>, "w") { |<+file+>| YAML.dump(<+obj+>, <+file+>) } | ||
File.open(${1:path_to_yml}, "w") { |${2:file}| YAML.dump(${3:obj}, ${4:$2}) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
File.open(<+"<+path+>.yaml"+>) { |<+file+>| YAML.load(<+file+>) } | ||
File.open(${1:path_to_yml}) { |${2:file}| YAML.load(${3:$2}) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
alias_method :<+new_name+>, :<+old_name+> | ||
alias_method :${1:new_name}, :${2:old_name} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_nothing_raised(<+Exception+>) { <++> } | ||
assert_nothing_raised(${1:Exception}) { ${2} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert <+test+>, "<+failure_message+>" | ||
assert ${1:test}, "${2:failure_message}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_equal <+expected+>, <+actual+> | ||
assert_equal ${1:expected}, ${2:actual} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_in_delta <+expected_float+>, <+actual_float+>, <+delta_float+> | ||
assert_in_delta ${1:expected_float}, ${2:actual_float}, ${3:delta_float} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_instance_of <+ExpectedClass+>, <+actual_instance+> | ||
assert_instance_of ${1:ExpectedClass}, ${2:actual_instance} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_kind_of <+ExpectedKind+>, <+actual_instance+> | ||
assert_kind_of ${1:ExpectedKind}, ${2:actual_instance} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_match /<+expected_pattern+>/, <+actual_string+> | ||
assert_match /${1:expected_pattern}/, ${2:actual_string} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_nil <+instance+> | ||
assert_nil ${1:instance} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_not_equal <+unexpected+>, <+actual+> | ||
assert_not_equal ${1:unexpected}, ${2:actual} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_no_match /<+unexpected_pattern+>/, <+actual_string+> | ||
assert_no_match /${1:unexpected_pattern}/, ${2:actual_string} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_not_nil <+instance+> | ||
assert_not_nil ${1:instance} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_not_same <+unexpected+>, <+actual+> | ||
assert_not_same ${1:unexpected}, ${2:actual} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_nothing_thrown { <++> } | ||
assert_nothing_thrown { ${1} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_operator <+left+>, :<+operator+>, <+right+> | ||
assert_operator ${1:left}, :${2:operator}, ${3:right} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_raise(<+Exception+>) { <++> } | ||
assert_raise(${1:Exception}) { ${2} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_respond_to <+object+>, :<+method+> | ||
assert_respond_to ${1:object}, :${2:method} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_send [<+object+>, :<+message+>, <+args+>] | ||
assert_send [${1:object}, :${2:message}, ${3:args}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
assert_throws(:<+expected+>) { <++> } | ||
assert_throws(:${1:expected}) { ${2} } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
TESTS = <+10_000+> | ||
TESTS = ${1:10_000} | ||
Benchmark.bmbm do |results| | ||
<++> | ||
end | ||
${2} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
case <++> | ||
when <++> | ||
case ${1} | ||
when ${2} | ||
else | ||
<++> | ||
${3} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
class <+\<c-r>=Snippet_RubyClassNameFromFilename()\<CR>+> | ||
class ${1:`Snippet_RubyClassNameFromFilename()`} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def <+function_name+> | ||
<++> | ||
def ${1:name} | ||
${2} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def method_missing(meth, *args, &blk) | ||
<++> | ||
end | ||
${1} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def self.<+class_method_name+> | ||
<++> | ||
end | ||
def self.${1:class_method_name} | ||
${2} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
def test_<+case_name+> | ||
<++> | ||
end | ||
def test_${1:case_name} | ||
${2} | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
detect { |<+element+>| <+body+> } | ||
detect { |${1:element}| ${2:body} } |
Oops, something went wrong.