Permalink
Switch branches/tags
Commits on Oct 29, 2015
  1. FixtureSet.fixture_class_names should have no default value

    jamis committed Oct 28, 2015
    Look at `TestFixtures.set_fixture_class`. As documented, it
    accepts a mapping of fixture identifiers (string or symbol) to Classes
    (the model classes that implement the named fixture).
    
    Look now at the initialization of `TestFixtures.fixture_class_names`.
    It defines a Hash, which will return a string by default (where the
    string is the estimated class name of the given fixture identifier).
    
    Now look at TestFixtures.load_fixtures. It calls `FixtureSet.create_fixtures`,
    passing in the mapping of `fixture_class_names`.
    
    Following this on to `FixtureSet.create_fixtures`, this instantiates a
    `FixtureSet::ClassCache`, passing in the map of class names.
    
    `ClassCache`, in turn, calls `insert_class` for each value in the cache.
    (Recall that `set_fixture_class` puts Class objects in there, while the
    default proc for the mapping puts String objects.)
    
    Look finally at `insert_class`. If the value is present, it checks to
    see if the value is a subclass of `AR::Base`. Fair enough...but wait!
    What if the value is a String? You get an exception, because a String
    instance cannot be compared with a Class.
    
    Judging from the implementation, it seems like the expected behavior
    here is for `fixture_class_names` to have no default proc. Look-ups are
    supposed to happen via `ClassCache`, with `fixture_class_names` existing
    solely as a repository for explicitly-registered class mappings.
    
    That is what this change does.
Commits on Jan 8, 2013
  1. view_cache_dependency API

    jamis committed Jan 8, 2013
    A declarative API for specifying dependencies that affect template
    cache digest computation. In your controller, specify any of said
    dependencies:
    
      view_cache_dependency { "phone" if using_phone? }
    
    When the block is evaluated, the resulting value is included in the
    cache digest calculation, allowing you to generate different digests
    for effectively the same template. (Mostly useful if you're mucking
    with template load paths.)
Commits on Jan 19, 2011
  1. Revert "make TestCaseTest work for pre-1.9 rubies, too"

    jamis committed Jan 19, 2011
    This reverts commit 7938039.
  2. Revert "scrub instance variables from test cases on teardown"

    jamis committed Jan 19, 2011
    This reverts commit 79a0622.
  3. Revert "rein in GC during tests by making them run (at most) once per…

    jamis committed Jan 19, 2011
    … second"
    
    This reverts commit 16a23a1.
  4. rein in GC during tests by making them run (at most) once per second

    jamis committed Jan 19, 2011
    this can provide a significant performance boost during testing, by
    preventing the GC from running too frequently.
  5. scrub instance variables from test cases on teardown

    jamis committed Jan 19, 2011
    this prevents test state from accumulating, resulting in leaked
    objects and slow tests due to overactive GC.
Commits on Sep 11, 2008
Commits on Sep 10, 2008
Commits on Aug 19, 2008
Commits on Feb 12, 2008
  1. remove support for ampersand-delimited cookie values

    jamis committed Feb 12, 2008
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on May 11, 2007
  1. don't assume the http authorization header will be nil, since some co…

    jamis committed May 11, 2007
    …nfigurations will pass it through as an empty string
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6718 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Mar 26, 2007
  1. Make sure the expiry hash is built by comparing the to_param-ized val…

    jamis committed Mar 26, 2007
    …ues of each hash
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6465 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Feb 28, 2007
  1. Set the original button value in an attribute of the button when usin…

    jamis committed Feb 28, 2007
    …g the :disable_with key with submit_tag
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Feb 22, 2007
  1. Fix broken tests

    jamis committed Feb 22, 2007
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Feb 7, 2007
  1. Made increment_counter/decrement_counter play nicely with optimistic …

    jamis committed Feb 7, 2007
    …locking, and added a more general update_counters method
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6139 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jan 30, 2007
  1. When dealing with SQLite3, use the table_info pragma helper, so that …

    jamis committed Jan 30, 2007
    …the bindings can do some translation for when sqlite3 breaks incompatibly between point releases. Also, make current_adapter? use is_a? instead of instance_of? to account correctly for adapter subclassing.
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jan 22, 2007
  1. Better docs for Object extensions (closes #7002)

    jamis committed Jan 22, 2007
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6011 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jan 17, 2007
  1. Allow fields_for to be nested in form_for

    jamis committed Jan 17, 2007
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jan 15, 2007
  1. be like a duck. Let's not rely on explicit classes, so we can pass pr…

    jamis committed Jan 15, 2007
    …oxy objects around and have them interpreted correctly by ActiveRecord's serialization routines
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5953 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  2. change Duration to use the new Object#acts_like? helper to do duck ty…

    jamis committed Jan 15, 2007
    …ping
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  3. Add Object#acts_like? and Time#acts_like_time? and Date#acts_like_dat…

    jamis committed Jan 15, 2007
    …e? to facilitate duck-typing
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5951 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  4. Make sure Duration uses duck-typing instead of explicit classes, so a…

    jamis committed Jan 15, 2007
    …pps can pass proxy objects around and have it all "just work"
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5948 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jan 11, 2007
  1. dry up some duplicated code

    jamis committed Jan 11, 2007
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5883 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  2. fix regression in has_one#create, that caused instances thus created …

    jamis committed Jan 11, 2007
    …to be orphaned
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5881 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Jan 1, 2007
  1. Make sure html_document is reset between integration test requests (c…

    jamis committed Jan 1, 2007
    …loses #6834)
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5828 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Dec 29, 2006
  1. try to appease the angry Oracle

    jamis committed Dec 29, 2006
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5808 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Dec 19, 2006
  1. Add a 'referer' attribute to TestRequest

    jamis committed Dec 19, 2006
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Commits on Nov 11, 2006
  1. Add grep-based fallback to reaper, so it can work in pidless setups (…

    jamis committed Nov 11, 2006
    …again)
    
    git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5488 5ecf4fe2-1ee6-0310-87b1-e25e094e27de