CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Thu, 31 Jul 2025 11:59:30 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090104064046
location: https://web.archive.org/web/20090104064046/https://github.com/defunkt/test_spec_on_rails/tree
server-timing: captures_list;dur=0.662029, exclusion.robots;dur=0.017574, exclusion.robots.policy;dur=0.007111, esindex;dur=0.011536, cdx.remote;dur=245.463727, LoadShardBlock;dur=392.597971, PetaboxLoader3.datanode;dur=72.267193, PetaboxLoader3.resolve;dur=95.026348
x-app-server: wwwb-app239
x-ts: 302
x-tr: 912
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
set-cookie: SERVER=wwwb-app239; path=/
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 301
server: nginx
date: Thu, 31 Jul 2025 11:59:31 GMT
content-type: text/html; charset=utf-8
content-length: 122
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sun, 04 Jan 2009 06:40:43 GMT
x-archive-orig-connection: close
x-archive-orig-set-cookie: _github_ses=BAh7ByIKZmxhc2hJQzonQWN0aW9uQ29udHJvbGxlcjo6Rmxhc2g6OkZsYXNoSGFzaHsABjoKQHVzZWR7ADoOcmV0dXJuX3RvIhgvd2VibWF0emUvZm9sbG93ZXJz--31ae0c22918eddfb36aeadbaaa90e9fc06ff3fd4; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090104064046/https://github.com/defunkt/test_spec_on_rails/tree/master
x-archive-orig-x-runtime: 451ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 122
cache-control: max-age=1800
memento-datetime: Sun, 04 Jan 2009 06:40:46 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 29 Apr 2008 00:08:09 GMT", ; rel="prev memento"; datetime="Wed, 19 Nov 2008 05:34:45 GMT", ; rel="memento"; datetime="Sun, 04 Jan 2009 06:40:46 GMT", ; rel="last memento"; datetime="Sun, 04 Jan 2009 06:40:46 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_7_20090104033323_crawl108-c/52_7_20090104063944_crawl103.arc.gz
server-timing: captures_list;dur=0.675956, exclusion.robots;dur=0.019237, exclusion.robots.policy;dur=0.007428, esindex;dur=0.011231, cdx.remote;dur=15.164558, LoadShardBlock;dur=413.277233, PetaboxLoader3.datanode;dur=330.605859, PetaboxLoader3.resolve;dur=287.351074, load_resource;dur=264.682173
x-app-server: wwwb-app239
x-ts: 301
x-tr: 731
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
HTTP/2 200
server: nginx
date: Thu, 31 Jul 2025 11:59:32 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Sun, 04 Jan 2009 06:40:45 GMT
x-archive-orig-connection: close
x-archive-orig-set-cookie: _github_ses=BAh7BzoOcmV0dXJuX3RvIhgvd2VibWF0emUvZm9sbG93ZXJzIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--60b5c072f1acd170a77f7eb77ff0b614a47c974a; path=/; expires=Wed, 01 Jan 2020 08:00:00 GMT; HttpOnly
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 2190ms
x-archive-orig-etag: "9ac8ae0669ee74e415b0f219f8562295"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 18867
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Sun, 04 Jan 2009 06:40:46 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 29 Apr 2008 00:08:09 GMT", ; rel="prev memento"; datetime="Tue, 29 Apr 2008 00:08:09 GMT", ; rel="memento"; datetime="Sun, 04 Jan 2009 06:40:46 GMT", ; rel="next memento"; datetime="Mon, 05 Jan 2009 08:11:27 GMT", ; rel="last memento"; datetime="Mon, 05 Jan 2009 08:11:27 GMT"
content-security-policy: default-src 'self' 'unsafe-eval' 'unsafe-inline' data: blob: archive.org web.archive.org web-static.archive.org wayback-api.archive.org athena.archive.org analytics.archive.org pragma.archivelab.org wwwb-events.archive.org
x-archive-src: 52_7_20090104033323_crawl108-c/52_7_20090104063944_crawl103.arc.gz
server-timing: captures_list;dur=0.719817, exclusion.robots;dur=0.020380, exclusion.robots.policy;dur=0.008131, esindex;dur=0.012448, cdx.remote;dur=9.586260, LoadShardBlock;dur=313.223385, PetaboxLoader3.datanode;dur=158.659664, PetaboxLoader3.resolve;dur=290.292972, load_resource;dur=215.920994
x-app-server: wwwb-app239
x-ts: 200
x-tr: 609
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=1
x-location: All
x-rl: 0
x-na: 0
x-page-cache: MISS
server-timing: MISS
x-nid: DigitalOcean
referrer-policy: no-referrer-when-downgrade
permissions-policy: interest-cohort=()
content-encoding: gzip
defunkt's test_spec_on_rails at master — GitHub
We got nominated! Help us out and vote for GitHub as Best Bootstrapped Startup of 2008. (You can vote once a day.) [ hide ]
This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (

This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (

Fork of pelargir/test_spec_on_rails | |
Description: | Rails plugin with helpers to test your app using test/spec. |
Homepage: | https://agilewebdevelopment.com/plugins/test_spec_on_rails |
Clone URL: |
git://github.com/defunkt/test_spec_on_rails.git
Give this clone URL to anyone.
git clone git://github.com/defunkt/test_spec_on_rails.git
|

Matthew Bass (author)
Wed Apr 02 18:40:14 -0700 2008
name | age | message | |
---|---|---|---|
![]() |
CHANGELOG | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
LICENSE | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
README | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
Rakefile | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
lib/ | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
test/ | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
README
test/spec/rails by Per "Tuxie" Wigren <per.wigren@gmail.com> This plugin contain some helpers to test your Rails app using test/spec. Installation ------------ * Install test/spec: gem install test-spec * Install test/spec/rails * require 'test/spec/rails' in your test_helper.rb Model validation ---------------- @user.should.validate @user.should.not.validate or: @user.should.be.validated @user.should.not.be.validated Redirection ----------- response.should.be.redirected # assert_response :redirect response.should.redirect foo_url(@foo) # assert_redirected_to foo_url(@foo) should.redirect_to :action => 'show' # because "response" is optional It's aliased as redirect, redirect_to, redirected and redirected_to Output verification ------------------- Wrapper for assert_select: get :show page.should.select "form#user_form" # require the output to have a <form id="user_form"> page.should.select "form#user_form" do |form| form.should.select "input[type=submit]" # the user_form must include a <input type="submit"> end HTTP Status ----------- Wrapper for assert_response: status.should.be :success status.should.be 200 Which template was rendered? ---------------------------- Wrapper for assert_template: template.should.be "foo/show.rhtml" Which layout used? ------------------ Wrapper for asserting that a certain layout is used: layout.should.be "foo" URL testing ----------- get :show, :user_id => 1 url.should.be "/users/1" url.should.be :controller => "users", :action => "show", :user_id => 1 Difference ---------- Wrapper for assert_difference: Article.should.differ(:count).by(2) { blah } Routing to set of url options from a given path (i.e., #assert_generates) ------------------------------------------------------------------------- assert_generates "/users/1", :controller => "users", :action => "show", :id => "1" becomes {:controller => "users", :action => "show", :id => "1"}.should.route_to "/users/1" Routing from a set of url options to an expected path (i.e., #assert_recognizes) -------------------------------------------------------------------------------- assert_recognizes({:controller => "users", :action => "show", :id => "1"}, {:path => "/users/1", :method => :get}) becomes {:path => "/users/1", :method => :get}.should.route_from :controller => "users", :action => "show", :id =>"1" Setup controller for testing + example usage -------------------------------------------- context "A guest" do use_controller FooController specify "isn't allowed to foo" do post :create, :foo => 'bar' flash[:error].should.not.be.blank response.should.redirect :controller => 'front', :action => 'show' assigns(:foo).errors.on(:bar).should.not.be.blank assigns(:foo).should.not.validate follow_redirect page.should.select "#errors", :text => /#{flash[:error]}/ end end context "Tuxie" do setup do use_controller FooController login_as :tuxie end specify "may foo" do post :create, :foo => 'bar' flash[:notice].should.not.be.blank assigns(:foo).errors.should.be.empty assigns(:foo).should.validate should.redirect_to :action => 'show' follow_redirect page.should.select "#notice", :text => /#{flash[:notice]}/ end end Misc ---- page, response and request are just aliases for self (the TestCase) so the following are functionally identical: page.should.redirect response.should.redirect request.should.redirect output, body, html and xhtml return @response.body so the following lines are identical: output.should.match /foo/ html.should.match /foo/ xhtml.should.match /foo/ body.should.match /foo/ If an object respond to #should_equal, that method will be used instead of assert_equal when using foo.should.equal(bar) or foo.should.be(bar) foo.should.not.equal and foo.should.not.be look for #should_not_equal
This feature is coming soon. Sit tight!