Friday, April 8, 2011

Ruby: Stringception - a string within a string

good reference on all the various ways to define strings in ruby
http://www.techotopia.com/index.php/Ruby_Strings_-_Creation_and_Basics

So that you can run testing like:

assert_difference( %[Story.count :conditions => 'state = "P"']) do
put :drop, :id => story.to_param, :state => 'P'
end

Where the query string contains a string.

No comments:

Post a Comment