CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Wed, 30 Jul 2025 21:46:17 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20081226073927
location: https://web.archive.org/web/20081226073927/https://github.com/pelargir/test_spec_on_rails/tree
server-timing: captures_list;dur=14.130987, exclusion.robots;dur=0.026383, exclusion.robots.policy;dur=0.012625, esindex;dur=0.012215, cdx.remote;dur=76.062065, LoadShardBlock;dur=192.296356, PetaboxLoader3.resolve;dur=35.946375, PetaboxLoader3.datanode;dur=76.179763
x-app-server: wwwb-app215
x-ts: 302
x-tr: 338
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: SERVER=wwwb-app215; 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: Wed, 30 Jul 2025 21:46:18 GMT
content-type: text/html; charset=utf-8
content-length: 123
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Fri, 26 Dec 2008 07:39:25 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20081226073927/https://github.com/pelargir/test_spec_on_rails/tree/master
x-archive-orig-x-runtime: 293ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 123
cache-control: max-age=1800
memento-datetime: Fri, 26 Dec 2008 07:39:27 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="prev memento"; datetime="Wed, 19 Nov 2008 06:00:37 GMT", ; rel="memento"; datetime="Fri, 26 Dec 2008 07:39:27 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_7_20081226024345_crawl101-c/52_7_20081226073635_crawl103.arc.gz
server-timing: captures_list;dur=1.021080, exclusion.robots;dur=0.036163, exclusion.robots.policy;dur=0.009939, esindex;dur=0.020187, cdx.remote;dur=30.672245, LoadShardBlock;dur=109.757474, PetaboxLoader3.datanode;dur=99.390185, PetaboxLoader3.resolve;dur=121.494994, load_resource;dur=183.718881
x-app-server: wwwb-app215
x-ts: 301
x-tr: 363
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:46:19 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Fri, 26 Dec 2008 07:39:27 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 1133ms
x-archive-orig-etag: "939729fcfb28aee8fc28c79559852bdc"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 19116
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Fri, 26 Dec 2008 07:39:27 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="prev memento"; datetime="Sun, 22 Jun 2008 16:45:51 GMT", ; rel="memento"; datetime="Fri, 26 Dec 2008 07:39:27 GMT", ; rel="next memento"; datetime="Sun, 28 Dec 2008 14:30:21 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_7_20081226024345_crawl101-c/52_7_20081226073635_crawl103.arc.gz
server-timing: captures_list;dur=0.708200, exclusion.robots;dur=0.025563, exclusion.robots.policy;dur=0.010390, esindex;dur=0.013789, cdx.remote;dur=10.777133, LoadShardBlock;dur=289.154543, PetaboxLoader3.datanode;dur=161.801973, PetaboxLoader3.resolve;dur=203.450445, load_resource;dur=104.733806
x-app-server: wwwb-app215
x-ts: 200
x-tr: 462
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
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 (

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)
Sat Jun 28 18:21:57 -0700 2008
name | age | message | |
---|---|---|---|
![]() |
CHANGELOG | Sat Jun 28 18:20:44 -0700 2008 | added should.render for testing template rendering [Matthew Bass] |
![]() |
LICENSE | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
README | Tue May 27 17:56:28 -0700 2008 | updated installation instructions [Matthew Bass] |
![]() |
Rakefile | Wed Apr 02 18:40:14 -0700 2008 | initial import [Matthew Bass] |
![]() |
lib/ | Sat Jun 28 18:21:57 -0700 2008 | marked TODOs [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. If you're running edge Rails you can install with: script/plugin install git://github.com/pelargir/test_spec_on_rails.git Otherwise just clone the project directly: git clone git://github.com/pelargir/test_spec_on_rails.git vendor/plugins/test_spec_on_rails 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!