CARVIEW |
Select Language
HTTP/2 302
server: nginx
date: Fri, 05 Sep 2025 03:03:51 GMT
content-type: text/plain; charset=utf-8
content-length: 0
x-archive-redirect-reason: found capture at 20090116030743
location: https://web.archive.org/web/20090116030743/https://github.com/bscofield/tester_xtreme/tree
server-timing: captures_list;dur=5.490780, exclusion.robots;dur=0.109974, exclusion.robots.policy;dur=0.022314, esindex;dur=0.383876, cdx.remote;dur=54.780353, LoadShardBlock;dur=143.059347, PetaboxLoader3.datanode;dur=65.622546, PetaboxLoader3.resolve;dur=45.158699
x-app-server: wwwb-app221
x-ts: 302
x-tr: 288
server-timing: TR;dur=0,Tw;dur=0,Tc;dur=0
set-cookie: wb-p-SERVER=wwwb-app221; 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: Fri, 05 Sep 2025 03:03:52 GMT
content-type: text/html; charset=utf-8
content-length: 119
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Fri, 16 Jan 2009 03:07:43 GMT
x-archive-orig-connection: close
x-archive-orig-status: 301 Moved Permanently
location: https://web.archive.org/web/20090116030743/https://github.com/bscofield/tester_xtreme/tree/master
x-archive-orig-x-runtime: 69ms
x-archive-orig-cache-control: no-cache
x-archive-orig-content-length: 119
cache-control: max-age=1800
memento-datetime: Fri, 16 Jan 2009 03:07:43 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 15 Apr 2008 09:26:36 GMT", ; rel="prev memento"; datetime="Tue, 15 Apr 2008 09:26:36 GMT", ; rel="memento"; datetime="Fri, 16 Jan 2009 03:07:43 GMT", ; rel="last memento"; datetime="Fri, 16 Jan 2009 03:07:43 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_20090116011028_crawl104-c/52_7_20090116030542_crawl103.arc.gz
server-timing: captures_list;dur=0.496168, exclusion.robots;dur=0.017770, exclusion.robots.policy;dur=0.008181, esindex;dur=0.012230, cdx.remote;dur=17.544754, LoadShardBlock;dur=274.486702, PetaboxLoader3.datanode;dur=160.765037, PetaboxLoader3.resolve;dur=117.591683, load_resource;dur=101.059400
x-app-server: wwwb-app221
x-ts: 301
x-tr: 425
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: Fri, 05 Sep 2025 03:03:52 GMT
content-type: text/html; charset=utf-8
x-archive-orig-server: nginx/0.6.31
x-archive-orig-date: Fri, 16 Jan 2009 03:07:43 GMT
x-archive-orig-connection: close
x-archive-orig-status: 200 OK
x-archive-orig-x-runtime: 312ms
x-archive-orig-etag: "55e5d565a8d11d162a28d50d0b6e89e2"
x-archive-orig-cache-control: private, max-age=0, must-revalidate
x-archive-orig-content-length: 17124
x-archive-guessed-content-type: text/html
x-archive-guessed-charset: utf-8
memento-datetime: Fri, 16 Jan 2009 03:07:43 GMT
link: ; rel="original", ; rel="timemap"; type="application/link-format", ; rel="timegate", ; rel="first memento"; datetime="Tue, 15 Apr 2008 09:26:36 GMT", ; rel="prev memento"; datetime="Tue, 15 Apr 2008 09:26:36 GMT", ; rel="memento"; datetime="Fri, 16 Jan 2009 03:07:43 GMT", ; rel="next memento"; datetime="Sat, 17 Jan 2009 04:44:23 GMT", ; rel="last memento"; datetime="Sat, 17 Jan 2009 04:44: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_20090116011028_crawl104-c/52_7_20090116030542_crawl103.arc.gz
server-timing: captures_list;dur=0.481512, exclusion.robots;dur=0.019453, exclusion.robots.policy;dur=0.008944, esindex;dur=0.010476, cdx.remote;dur=39.495103, LoadShardBlock;dur=89.184765, PetaboxLoader3.datanode;dur=81.926499, PetaboxLoader3.resolve;dur=100.626595, load_resource;dur=99.058490
x-app-server: wwwb-app221
x-ts: 200
x-tr: 274
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
bscofield's tester_xtreme 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 providing Test::Unit macros for controller and model testing |
Clone URL: |
git://github.com/bscofield/tester_xtreme.git
Give this clone URL to anyone.
git clone git://github.com/bscofield/tester_xtreme.git
|

mcornick (author)
Wed Mar 05 12:30:19 -0800 2008
name | age | message | |
---|---|---|---|
![]() |
MIT-LICENSE | Loading commit data... ![]() |
|
![]() |
README | ||
![]() |
init.rb | ||
![]() |
install.rb | ||
![]() |
lib/ | ||
![]() |
test/ |
= TesterXtreme The Tester Xtreme plugin is a way to distill common testing patterns into easy-to-use macros that are added as class methods to your test cases. There are currently macros for both unit (ActiveRecord model) and functional (ActionController controllers) tests. == Unit Test Macros === Validation Tests Each of the validation testing macros checks to make sure there is an appropriate validation method defined in the model for each attribute specified. *should_require* Ensures that +validates_presence_of+ was used. *should_require_numeric* Ensures that +validates_numericality_of+ was used. *should_require_unique* Ensures that +validates_uniqueness_of+ was used. *should_protect* Ensures that +attr_protected+ was used for this attribute. *Usage*: class UserTest < ActiveSupport::TestCase should_require :first_name, :last_name should_require_unique :username should_require_numeric :friends_count should_protect :hashed_password end === Association Tests Each of the association testing macros checks to make sure the correct associations were defined on this model. The names map directly to the association definitions: *should_have_many* Ensures that +has_many+ was used. *should_belong_to* Ensures that +belongs_to+ was used. *should_have_one* Ensures that +has_one+ was used. *should_have_and_belong_to_many* Ensures that +has_and_belongs_to_many+ was used. *Usage*: class UserTest < ActiveSupport::TestCase should_have_many :friends should_belong_to :organization should_have_one :credit_card should_have_and_belong_to_many :categories end == Functional Test Macros Each of the functional testing macros require that you first request an action on the controller. To accomplish this, the 4 standard actions are implemented as class methods for the test: * get * post * put * delete In addition to simple requests, you can also specify parameters and initial states: get(:show){ User.expects(:find).returns(mocked_user) }.with(:id => 1) post(:create).with(:username => 'foobar') From here, you can use the macros to define certain expectations on the controller: *should_assign* Asserts that the specified variable is set as an instance variable. *should_not_assign* Asserts that the specified variable is *not* set as an instance variable. *should_use_filter* Asserts that the designated filter method is run. *should_not_use_filter* Asserts that the designated filter method is *not* run. *should_render* Asserts that the response for the action is successful and that the specified template is rendered. *should_set_flash* Asserts that the specified key and value was set in the flash collection. *should_set_session* Asserts that the specified variable was set in session. *should_redirect_to* Asserts that the response was a redirect and that the action redirects to the specified route. *Usage*: class UsersController < ActionController::TestCase get(:new).should_render(:new) post(:create).with(:username => 'foo').should_redirect_to(:new_user_url) delete(:destroy).should_set_flash(:notice, 'You must log in') get(:show).with(:id => 1).should_use_filter(:check_for_current_user) get(:show).with({:id => 1}, {:user_id => 3}).should_assign(:current_user) end = Credits Copyright (c) 2007 Ben Scofield, released under the MIT license
This feature is coming soon. Sit tight!