Skip to content

Instantly share code, notes, and snippets.

View dgoldie's full-sized avatar

Doug Goldie dgoldie

  • Mountain View, CA
View GitHub Profile
Scenario: Edit Site # features/edit_sites.feature:41
Given I am on the homepage # features/step_definitions/web_steps.rb:12
When I log in with email: "admin@foo.com" and password: "password"
# features/step_definitions/homepage_steps.rb:12
And I go to the edit page of the site: "BOZO" # features/step_definitions/web_steps.rb:16
And I fill in "site_tier" with "5" # features/step_definitions/web_steps.rb:32
And I fill in "new memo" for "site_memo" # features/step_definitions/web_steps.rb:36
-0.0-0.0 And I press "Update" # features/step_definitions/web_steps.rb:20
And I go to the edit page of the site: "BOZO" # features/step_definitions/web_steps.rb:16
...
3 scenarios (3 passed)
30 steps (30 passed)
0m2.846s
The --wip switch was used, so I didn't expect anything to pass. These scenarios passed:
(::) passed scenarios (::)
features/edit_sites.feature:12:in `Scenario: List Sites'
@dgoldie
dgoldie / gist:668198
Created November 8, 2010 20:21
unit test in Rails 3 with factory_girl
$ rake test:units --trace
(in /Users/doug/code/apps/greenmonkey)
** Invoke test:units (first_time)
** Invoke test:prepare (first_time)
** Invoke db:test:prepare (first_time)
** Invoke db:abort_if_pending_migrations (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
uninitialized constant FactoryGirl
@dgoldie
dgoldie / mice.css
Created December 6, 2010 12:36 — forked from jeffkreeftmeijer/mice.css
spike of node.js and web sockets
.mouse, #preview{
position: absolute;
background-repeat: no-repeat;
height: 22px;
min-width: 15px;
z-index: 100;
}
.mouse{
background-image: url('../images/cursor.png');
@dgoldie
dgoldie / gist:766979
Created January 5, 2011 20:49
jcarousel insert example
function mycarousel_initCallback(carousel) {
console.log('init');
jQuery('.jcarousel-control a').bind('click', function() {
var size = carousel.size(),
first = carousel.first,
last = carousel.last;
console.log('carousel first = ' + first + ', size = ' + size + ', last = ' + last);
// var addIndex = first - 0.1;
// carousel.add(addIndex, '<li><div></div></li>');
@dgoldie
dgoldie / gist:766982
Created January 5, 2011 20:52
complete jcarousel insert element example
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us">
<head>
<title>jCarousel Examples</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<!--
jQuery library
-->
<script type="text/javascript" src="../lib/jquery-1.4.2.min.js"></script>
//
// Backbone.Rails.js
//
// Makes Backbone.js play nicely with the default Rails setup, i.e.,
// no need to set
// ActiveRecord::Base.include_root_in_json = false
// and build all of your models directly from `params` rather than
// `params[:model]`.
//
// Load this file after backbone.js and before your application JS.
@dgoldie
dgoldie / gist:822964
Created February 11, 2011 20:29
brash seg. fault
some errors are ...[BUG] Segmentation fault,
$ script/console
Loading development environment (Rails 2.3.4)
~> Console extensions: wirble hirb ap rails2 rails3 pm interactive_editor
/Users/doug/code/work/brash/web/config/../vendor/rails/railties/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/Users/doug/code/work/brash/web/vendor/rails/activesupport/lib/active_support/core_ext/module/introspection.rb:73: [BUG] Segmentation fault
ruby 1.8.7 (2010-08-16 patchlevel 302) [i686-darwin10.6.0]
@dgoldie
dgoldie / gist:851806
Created March 2, 2011 21:46
clearance no migration issue
doug@zeus ~/code/spikes/vern
$ rails g clearance:install
identical config/initializers/clearance.rb
insert app/controllers/application_controller.rb
insert app/models/user.rb
identical spec/factories/clearance.rb
*******************************************************************************
Next steps:
@dgoldie
dgoldie / gist:867761
Created March 13, 2011 01:07
greendog template issue
doug@zeus ~/code/templates/spikes
$ rails new newbie -m ../greendog99/template.rb
create
create README
create Rakefile
create config.ru
create .gitignore
create Gemfile
create app
create app/controllers/application_controller.rb