Skip to content

Instantly share code, notes, and snippets.

From ac79dd7c726dde04be6a1a1dfdd6c781276b31b4 Mon Sep 17 00:00:00 2001
From: Wincent Colaiuta <[email protected]>
Date: Tue, 6 Jul 2010 17:48:20 +0200
Subject: [PATCH] Make view helpers available in view specs
This maintains the behavior established in RSpec 1.
See:
http://github.com/rspec/rspec-rails/issues/issue/119
require File.expand_path('../../spec_helper', File.dirname(__FILE__))
describe Admin::ForumsController do
describe 'routing' do
# controller only implements #index, #show and #update
specify { get('/admin/forums').should have_routing('admin/forums#index') }
specify { get('/admin/forums/foo').should have_routing('admin/forums#show', :id => 'foo') }
specify { put('/admin/forums/foo').should have_routing('admin/forums#update', :id => 'foo') }
# the remaining RESTful actions aren't recognized
From cffa1be105cc94c2e886c5fb59e490da08293373 Mon Sep 17 00:00:00 2001
From: Wincent Colaiuta <[email protected]>
Date: Sat, 3 Jul 2010 17:31:02 +0200
Subject: [PATCH] WIP
---
features/compatibility.feature | 36 ++++++++++++++++++++++++++++++++++++
lib/rspec/mocks.rb | 2 +-
2 files changed, 37 insertions(+), 1 deletions(-)
create mode 100644 features/compatibility.feature
From ac95f82382939821dc89c5fef9f9c5404f528768 Mon Sep 17 00:00:00 2001
From: Wincent Colaiuta <[email protected]>
Date: Sat, 3 Jul 2010 12:12:50 +0200
Subject: [PATCH] Fixes for "router" and "routes" terminology
Commit f7ba614c2db improved the internal consistency of the different
means of accessing routes, but it introduced some problems at the level
of code comments and user-visible strings.
This commit applies fixes on three levels:
'Browser#html does not fail for huge pages' FAILED
expected "" to include "hello</body>"
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/fail_with.rb:41:in `fail_with'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/handler.rb:21:in `handle_matcher'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/expectations/extensions/kernel.rb:27:in `should'
/Users/wincent/trabajo/vendor/celerity/celerity.git/spec/browser_spec.rb:83:
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:40:in `instance_eval'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:40:in `execute'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:37:in `execute'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:214:in `run_examples'
FileField#set
192.168.1.6 - - [23/Jun/2010:16:13:18 CEST] "GET /bogus.css HTTP/1.1" 404 418
Referer -> /bogus.css
[2010-06-23 16:13:18] ERROR ArgumentError: negative length -39 given
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:546:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:499:in `loop'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:499:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:270:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:148:in `POST'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:167:in `params'
Button#click
192.168.1.6 - - [23/Jun/2010:16:13:16 CEST] "GET /bogus.css HTTP/1.1" 404 418
Referer -> /bogus.css
[2010-06-23 16:13:16] ERROR ArgumentError: negative length -41 given
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:546:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:499:in `loop'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:499:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:270:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:148:in `POST'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:167:in `params'
Button#click_no_wait
192.168.1.6 - - [23/Jun/2010:16:13:13 CEST] "GET /forms_with_input_elements.html HTTP/1.1" 200 9350
- -> /forms_with_input_elements.html
192.168.1.6 - - [23/Jun/2010:16:13:13 CEST] "GET /bogus.css HTTP/1.1" 404 418
Referer -> /bogus.css
[2010-06-23 16:13:13] ERROR ArgumentError: negative length -35 given
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:546:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:499:in `loop'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/utils.rb:499:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/rack-1.2.1/lib/rack/request.rb:270:in `parse_multipart'
/usr/local/jruby-1.5.1/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.3.2-java/lib/ruby-debug-base.rb:214 warning: tracing (e.g. set_trace_func) will not capture all events without --debug flag
[2010-06-23 16:13:02] INFO WEBrick 1.3.1
[2010-06-23 16:13:02] INFO ruby 1.8.7 (2010-06-06) [java]
[2010-06-23 16:13:02] INFO WEBrick::HTTPServer#start: pid=80849 port=2000
Browser#credentials=
192.168.1.6 - - [23/Jun/2010:16:13:03 CEST] "GET /authentication HTTP/1.1" 401 22
- -> /authentication
192.168.1.6 - - [23/Jun/2010:16:13:03 CEST] "GET /authentication HTTP/1.1" 401 22
- -> /authentication
From 4c3574c21d09efbdd649f93f3db3af7455f9369e Mon Sep 17 00:00:00 2001
From: Wincent Colaiuta <[email protected]>
Date: Wed, 23 Jun 2010 01:39:29 +0200
Subject: [PATCH] Add the ability to override default "spec/acceptance" dir
Some users may wish to keep their acceptance specs in a directory that
is completely separate from their existing "specs" directory (for
example, because they don't want to run the acceptance specs whenever
they do "rake spec").