- Today is Earth Day
- There are lots of parties around town due to the Web 2.0 Expo
Combining this with yui and IE7 gets a lot closer to behaving as you might expect!
port install bash-completion
mod_proxy_html – if you’re hoping to get this to work, you may have to worry about INFLATEing the html response coming from the server you’re proxying to before being able to parse the html and change its urls. We ended up using
SetOutputFilter INFLATE;proxy-html;DEFLATE to pass the html through the Apache2 proxy instance correctly.
Don’t forget to make use of the reserved (top- and second-level) domain names set aside by RFC 2606… especially if you find yourself writing something like:
result = @model.do_request('http://www.somebogusdomain.com') result.code.should == 1001 # NOTE: www.somebogusdomain.com actually exists!
The intersection of development and UI is an area I’ve got some interest in.
Arena just shared this amazing article about a team’s experience merging Agile project management with User Research and testing.
User Research as a Commodity (part 3 of 7) by Tim Kieschnick
Here (below the fold) are some of the things in the article I found eye-opening.
The major downside so far: it scales background images.
In a failing/rolled back transaction, those ActiveRecord
objects that were created prior to the exception still have IDs and respond
object_name.new_record? (which would seem to indicate that a record for the object has been saved).
items = Item.find(:all) get :index response.body.should have_nodes("//items/item", items.size) response.body.should have_xpath("//items/item[ position() = 1 and @id = '0001' ]") response.body.should_not have_xpath("//bogus")
Some other possibilities:
items = Item.find(:all) get :index hash = Hash.from_xml(response.body) hash['ancestor']['parent']['items']['item'].size.should == items.size hash['ancestor']['parent']['items']['item']['id'].should == '0001' hash['ancestor']['parent']['bogus'].should be_nil
items = Item.find(:all) get :index doc = Hpricot(response.body) doc.search("//items/item").size.should == items.size doc.at("//items/item[ @id = '0001' ]").position.should == 1 doc.at("//bogus").should be_nil
assert_select from Rail’s Test::Unit (using CSS-style selectors)…
items = Item.find(:all) get :index assert_select("items > item", :count => 5) assert_select("items > item:nth-child(1)[id=?]", '0001') assert_select("bogus", false)
What are your favorite techniques for asserting XML/XPath?
Something to consider when test-driving controller code:
You’re working with
response.redirect?, etc. are available for you there (since they are
defined on TestResponse), but not in your actual controllers. That is,
things blow up if you try to use
@response.success? in your application,
e.g. to determine whether or not to store the current URL and redirect there
after a login.
Does anybody know anything about Lucene scoring using a document boost?
We see an exponential relationship between document boost and the fieldNorm component of the score for each term. Can anybody explain this?