- Demo error
- Describe feature spec
- rails/info
- discuss ctags of gems (link to videos)
- better_errors
- binding.pry
- show_source
- bundle show --paths
- Upcase spec/features/user_accepts_team_invitation_spec.rb:13 (using_session)
method(:using_session).source_location
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
module SqlQueryCountingHelpers | |
# This helper can be used to instrument a segment of test code to analyze the | |
# SQL queries being executed for that portion of the code path. | |
# | |
# It's intended to be used around specific portions of a spec rather than an | |
# entire spec as the FactoryBot usage adds a good amount of noise to the SQL | |
# analysis due to the many objects & associations created. | |
# | |
# Usage example (using spec/requests/api/v1/projects_spec.rb): | |
# |
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
require "rails_helper" | |
describe "news_link/index.html.erb" do | |
context "when there are additional pages" do | |
it "shows the 'Show more' link" do | |
news_links_page = build_news_link_page(has_more_pages: true) | |
render_page(news_links_page) | |
expect(rendered).to have_link('Show More') |
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
" Strip extraneous whitespace (duplicate or trailing) in current paragraph. | |
function! s:StripDuplicateWhitespace() | |
let save_cursor = getpos(".") | |
normal! {jms | |
normal! }me | |
's,'es/\S\@<=\s\{2,}/ /g | |
's,'es/\s\+$// | |
call setpos('.', save_cursor) | |
endfunction | |
command! StripDuplicateWhitespace call <sid>StripDuplicateWhitespace() |
Install jsonlint
to act as syntastic json checker:
$ npm install jsonlint -g
Tell syntatastic about it:
" in your ~/.vimrc
I hereby claim:
- I am christoomey on github.
- I am christoomey (https://keybase.io/christoomey) on keybase.
- I have a public key whose fingerprint is DFE3 B12A 74A7 63B1 3CF9 CEC6 9273 CF6D 703D CCC8
To claim this, I am signing this object:
Turns out that angular $watch
statements will always fire once to
"initialize" the 'watch' statement. The officially recommended workaround,
should you not want this behavior, is to use an object identity check to
compare the values, ie:
$scope.$watch 'allProviders', (selected, prior) ->
return if selected is prior
...
Talk notes from Vim for Ruby and Rails workshop at BostonRb March 2014 meetup.
https://gist.github.com/christoomey/9357451
- Chris Toomey
- @christoomey
- http://ctoomey.com
- github.com/christoomey
Rails.vim
NewerOlder