[rspec-users] ApplicationHelper

2008-03-19 Thread nzook
When working with views, I use instance methods of ApplicationHelper: # app/helpers/application_helper.rb: module ApplicationHelper def distribute(total, min, cutof, list) [1,2,3] end end # app/views/planner/_mta_colors.rhtml: <% ... dist = distribute(total_v_px, 4, 0, colors.collect{|c

[rspec-users] Shouldn't should return true?

2008-03-17 Thread nzook
'cause it doesn't... This is an issue for nested custom matchers, ie: module CRFT class RFT def initialize(args) blah end def matches?(target) "Yeah, baby!" end end def r_f_t(args) RFT.new(args) end end module CRLT class RLT include CRFT def ini

Re: [rspec-users] Warning: integrate_views and nested description groups

2008-03-13 Thread nzook
And a pony. Thanks David Chelimsky-2 wrote: > > On Wed, Mar 12, 2008 at 8:23 PM, nzook <[EMAIL PROTECTED]> wrote: >> >> describe MyController do >> integrate_views >> describe "A common base senario" do >> it "no longer integ

[rspec-users] Warning: integrate_views and nested description groups

2008-03-12 Thread nzook
describe MyController do integrate_views describe "A common base senario" do it "no longer integrates views" do be_careful end end end integrate_views affects an attribute in the class formed by the describe factory method. The second describe generates its own class, so integ

[rspec-users] Whence "post" in a description?

2008-03-12 Thread nzook
I'm having the exact problem described in this earlier post: http://www.nabble.com/Odd-response.body-behavior-to12837556.html#a12837556 That is, after a post, response.body is just the controller/view string ("user/login" in my case). Failing to find any answer on the web, I'm trying to trace ex