CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 30 Jul 2025 21:33:37 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20080429002921
location: https://web.archive.org/web/20080429002921/https://github.com/pelargir/test_spec_on_rails/tree
server-timing: captures_list;dur=0.475500, exclusion.robots;dur=0.016201, exclusion.robots.policy;dur=0.006992, esindex;dur=0.008427, cdx.remote;dur=33.957483, LoadShardBlock;dur=333.189616, PetaboxLoader3.datanode;dur=105.473774, PetaboxLoader3.resolve;dur=111.059532
x-app-server: wwwb-app203
x-ts: 302
x-tr: 401
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app203; 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 302
server: nginx
date: Wed, 30 Jul 2025 21:33:38 GMT
content-type: text/html; charset=utf-8
content-length: 123
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Tue, 29 Apr 2008 00:29:20 GMT
x-archive-orig-connection: close
x-archive-orig-status: 302 Found
location: https://web.archive.org/web/20080429002921/https://github.com/pelargir/test_spec_on_rails/tree/master
x-archive-orig-x-runtime: 0.19192
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 123
cache-control: max-age=1800
memento-datetime: Tue, 29 Apr 2008 00:29:21 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 29 Apr 2008 00:29:21 GMT", ; rel="memento"; datetime="Tue, 29 Apr 2008 00:29:21 GMT", ; rel="next memento"; datetime="Fri, 25 Jul 2008 08:16:24 GMT", ; rel="last memento"; datetime="Fri, 26 Dec 2008 07:39: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_3_20080428191648_crawl102-c/52_3_20080429002853_crawl103.arc.gz
server-timing: captures_list;dur=0.549920, exclusion.robots;dur=0.020230, exclusion.robots.policy;dur=0.009516, esindex;dur=0.012524, cdx.remote;dur=17.303355, LoadShardBlock;dur=269.861287, PetaboxLoader3.datanode;dur=179.550059, PetaboxLoader3.resolve;dur=247.921845, load_resource;dur=198.812503
x-app-server: wwwb-app203
x-ts: 302
x-tr: 512
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
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: Wed, 30 Jul 2025 21:33:39 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.26
x-archive-orig-date: Tue, 29 Apr 2008 00:29:21 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 0.48535
x-archive-orig-etag: "fb216339b985d68f625cbb05a35de548"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 17269
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Tue, 29 Apr 2008 00:29:21 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 29 Apr 2008 00:29:21 GMT", ; rel="memento"; datetime="Tue, 29 Apr 2008 00:29:21 GMT", ; rel="next memento"; datetime="Sun, 22 Jun 2008 16:45:51 GMT", ; rel="last memento"; datetime="Wed, 27 Jul 2022 19:12:23 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_3_20080428191648_crawl102-c/52_3_20080429002853_crawl103.arc.gz
server-timing: captures_list;dur=0.704238, exclusion.robots;dur=0.028400, exclusion.robots.policy;dur=0.012239, esindex;dur=0.013493, cdx.remote;dur=8.249383, LoadShardBlock;dur=172.484707, PetaboxLoader3.datanode;dur=132.527918, PetaboxLoader3.resolve;dur=129.249712, load_resource;dur=174.908461
x-app-server: wwwb-app203
x-ts: 200
x-tr: 420
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
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
pelargir's test_spec_on_rails at master — GitHub
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/pelargir/test_spec_on_rails.git
Give this clone URL to anyone.
git clone git://github.com/pelargir/test_spec_on_rails.git
|

Matthew Bass (author)
20 days ago
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 | Tue Apr 08 06:28:23 -0700 2008 | Updated README with Git clone URL [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 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 Source ------ test/spec/rails uses Git for source control. The clone URL is: git://github.com/pelargir/test_spec_on_rails.git 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 Credit ------ * Created by Per "Tuxie" Wigren <per.wigren@gmail.com> * Enhanced by Rick Olson <technoweenie@gmail.com> * Currently maintained by Matthew Bass <pelargir@gmail.com>
This feature is coming soon. Sit tight!