Public Gists by zdennis

Gravatar
Mon Oct 12 08:14:34 -0700 2009
1
2
3
  var findParentWithClass = function(node, className){
    var klass;
    while(true){
Gravatar
Fri Oct 02 14:09:41 -0700 2009
1
2
3
Scenario: User making a purchases decreases their balance
  Given there is a "Foo" widget that costs $75
  Given "Joe" is a user with a $100 balance
Gravatar
Thu Sep 03 15:14:33 -0700 2009
1
2
3
POST /spackle1/api/studentprojects/e43f85a96b36413b802c1792b893dea8/tasks/6999dc92dee6485980a59c8b9c74e4e7/submissions/ HTTP/1.1
Accept: */*
Content-Type: application/x-www-form-urlencoded
Gravatar
Mon Aug 31 08:43:10 -0700 2009
1
2
3
The error occurred while evaluating nil.each>
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/utils.rb:192:in `initialize'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:15:in `new'
Gravatar
Mon Aug 31 08:43:06 -0700 2009
1
2
3
The error occurred while evaluating nil.each>
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/utils.rb:192:in `initialize'
/Library/Ruby/Gems/1.8/gems/rack-1.0.0/lib/rack/content_length.rb:15:in `new'
Gravatar
Sun Aug 30 13:57:45 -0700 2009
1
2
3
url = "http://localhost:8000/spackle1/api/studentprojects/d0d84e45657d4841b504db75a196d708/tasks/6999dc92dee6485980a59c8b9c74e4e7/submissions/"
body = {
 :url => "http://test/url",
Gravatar
Fri Aug 28 13:20:15 -0700 2009
1
2
3
POST /spackle1/api/people/? HTTP/1.1
Connection: close
Content-Type: application/json
Gravatar
Tue Jul 07 19:07:08 -0700 2009
1
2
3
---> Building libtheora
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_multimedia_libtheora/work/libtheora-1.0" && make all " returned error 2
Command output: dec/apiwrapper.c:49: error: '_th' undeclared (first use in this function)
Gravatar
Tue Jul 07 19:06:26 -0700 2009
1
2
3
$ sudo port install libvorbis
---> Building libvorbis
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_audio_libvorbis/work/libvorbis-1.2.2" && make all " returned error 2
Gravatar
Tue Jul 07 06:23:13 -0700 2009
1
2
3
  def stub_filters_of_type(type, options)
    controller.class.send("#{type}_filters").each do |filter_name|
      next if options[:except].respond_to?(:include?) && options[:except].include?(filter_name)
Gravatar
Sun Jun 14 15:21:57 -0700 2009
1
2
3
    webrat "should raise an error", :rails, :rack, :mechanize do
      lambda { check "remember_me" }.should raise_error(Webrat::NotFoundError)
    end
Gravatar
Sun Jun 14 14:55:04 -0700 2009
1
2
3
# the current spike
 
    simulated "should raise an error" do
Gravatar
Tue May 12 20:15:46 -0700 2009
1
2
3
# ar-extensions only affects ActiveRecord so I have
# a rake task which loads ActiveRecord, and then
# ar-extensions, and then runs ActiveRecord's test suite
Gravatar
Wed May 06 11:40:52 -0700 2009
1
2
3
describe Order do
  uses_transaction "should create a new one"
  
Gravatar
Mon Apr 20 18:47:34 -0700 2009
1
2
3
Given I'm logged in Joe
And I write the amazing blog post on 03-01-2009:
  """
Gravatar
Sat Apr 18 16:08:15 -0700 2009
1
2
3
class Item < ActiveRecord::Base
  def self.make_three_with_transactions
    transaction do
Gravatar
Wed Mar 25 19:25:51 -0700 2009
1
2
3
describe MyCustomerAdapter do
  should_support_adapter_interface :create
  should_support_adapter_interface :delete
Gravatar
Sun Mar 22 17:48:40 -0700 2009
1
2
3
 $ bin/spec spec
/Users/zdennis/source/opensource_projects/rspec-dev/example_rails_app/vendor/plugins/rspec/spec/spec/runner/heckle_runner_spec.rb:5: Foo is not a module (TypeError)
from /Users/zdennis/source/opensource_projects/rspec-dev/example_rails_app/vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:15:in `load'
Gravatar
Fri Mar 06 15:00:31 -0800 2009
1
2
3
SubdomainFu.tld_sizes = {:development => 1,
                         :test => 1 ,
                         :selenium => 1,
Gravatar
Thu Mar 05 10:48:04 -0800 2009
1
2
3
/Users/zdennis/source/mhs_projects/quest/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:209:in `initialize': wrong number of arguments (2 for 1) (ArgumentError)
from /Users/zdennis/source/mhs_projects/quest/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:209:in `new'
from /Users/zdennis/source/mhs_projects/quest/vendor/plugins/rspec/lib/spec/example/example_group_methods.rb:209:in `execute_examples'