Skip to content

Instantly share code, notes, and snippets.

assert.equal(
find('.order-contact__info .text--big.text--right').text(), '$12.56',
'Total is shown');
assert.equal(
find('.order-contact__info .text--alt.text--right').text(), '#EFGH-123456',
'Order number is shown');
assert.equal(
find('.order-detail address p:eq(0)').text(), '411 Walnut St.',
@biscuitvile
biscuitvile / tz.diff
Last active August 29, 2015 14:18
tz.diff
From 0220cab1cbe460387a7323e0de231271d448d825 Mon Sep 17 00:00:00 2001
From: Alexander Dymo <gremlin@earth.(none)>
Date: Thu, 7 May 2009 03:19:17 +0300
Subject: [PATCH] Fix the spelling of Kyiv timezone (Kyev is incorrect, Kyiv is the correct one)
---
.../lib/active_support/values/time_zone.rb | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/activesupport/lib/active_support/values/time_zone.rb b/activesupport/lib/active_support/values/time_zone.rb
@biscuitvile
biscuitvile / tmate.sh
Last active August 29, 2015 14:17 — forked from marcosnils/tmate.sh
#!/bin/bash
set -e
SLACK_WEBHOOK_URL=
DEFAULT_EMOJI=:slack:
CHANNEL=${1:-#general}
AUTHOR="Some user"
tmate -S /tmp/tmate.sock new-session -d && tmate -S /tmp/tmate.sock wait tmate-ready
" RSpec Expect To
imap <leader>et expect().to<ESC>F(a
" RSpec Expect To Equal
imap <leader>ete expect().to eql<ESC>F(a
" RSpec Expect To Include
imap <leader>eti expect().to include<ESC>F(a
" RSpec Expect To Be
diff --git a/app/assets/javascripts/mobile/views/product_form_view.js.coffee b/app/assets/javascripts/mobile/views/product_form_view.js.coffee
index cddbc4f..e2f67cb 100644
--- a/app/assets/javascripts/mobile/views/product_form_view.js.coffee
+++ b/app/assets/javascripts/mobile/views/product_form_view.js.coffee
@@ -228,7 +228,7 @@ class ProductFormView extends FormView
@ui.addOption.show()
optionsLength: ->
- @ui.optionsList.find('li').length
+ @ui.optionsList.find('li.option').length
it "validates that names won't create identical permalinks" do
account = Factory(:account)
account.artists.create(:name => 'John Boy')
a = Factory.build(:artist, :name => '!john $boy#', :account => account)
a.should_not be_valid
end
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require File.expand_path('../config/application', __FILE__)
# require 'rspec/core/rake_task'
Admin::Application.load_tasks
# desc 'Generate API request documentation'
# RSpec::Core::RakeTask.new('api:docs:generate') do |task|
require "rails_helper"
describe Product do
it 'cannot associate with categories from other accounts' do
account = create :account
product = build :product, account: account
a = create :category, account: account
b = create :category, account: build(:account)
product.category_ids = [a.id, b.id]
@biscuitvile
biscuitvile / reverse-input.md
Created November 25, 2014 00:48
Reverse Input

Reverse the Input

Write a program which reads a number of strings from standard input and prints them in reverse order on the screen. The input sequence is terminated with the string END.

$ reverse-strings
one
two
three
END
@biscuitvile
biscuitvile / git-workflow.md
Last active August 29, 2015 14:10
Git Workflow

Git Feature Branch Workflow

Setting up and working on a feature branch

  1. Make sure you're on the master branch and your git status is clean
  2. Next make sure your local master branch is up to date with master branch at origin: git pull --rebase or gpr with the dotmatrix alias
  3. Once you have confirmed you have a clean index and you are up to date, create a new feature branch. If you're working on a new feature for pagination for example, something like this would work git checkout -b pagination or with dotmatrix aliases gco -b pagination. Some people like to make GitHub issues for the work they're about to do and prefix the feature with a number matching the GitHub issue, like this gco -b 352-pagination
  4. Do all of your work as normal in this branch and make commits freely. When you are ready to push the branch up you can do so like this: git push origin 352-pagination. Alternativley, you can use the dotmatrix alias git put. This will assume that whatever branch name you are on l