DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Example Of Using With_options In Rspec Test

03.13.2009
| 3045 views |
  • submit to reddit
        // description of your code here

    it "should have working pages" do
      with_options :blog_id => @blog, :post_id => @post do |page|
        page.get    :new
        page.post   :create,  :comment => { }
        page.delete :destroy, :id => comments(:blog_comment)
      end
    end