Re: [rspec-users] rspec license plate

2008-06-16 Thread Al Chou
And notice that the car's red. Not ruby red, but then rubies usually aren't really the shade of red that most people think they should be. Al - Original Message From: Daniel Barry <[EMAIL PROTECTED]> To: rspec-users@rubyforge.org Sent: Monday, June 16, 2008 2:39:46 PM Subject: [rspec

Re: [rspec-users] spec'ing calls to super (or other Ruby keywords)

2008-05-03 Thread Al Chou
method calls super. Al - Original Message From: Scott Taylor <[EMAIL PROTECTED]> To: rspec-users Sent: Saturday, May 3, 2008 1:51:51 PM Subject: Re: [rspec-users] spec'ing calls to super (or other Ruby keywords) On May 3, 2008, at 11:09 AM, Al Chou wrote: In the particular ca

Re: [rspec-users] spec'ing calls to super (or other Ruby keywords)

2008-05-03 Thread Al Chou
In the particular case of super, another approach, though perhaps not using the spec framework, would be to assert (a la Test::Unit) that your class is a subclass of the intended superclass. To be truly anal, also assert that the superclass has a method with the same name as the subclass's meth

Re: [rspec-users] new in ruby and rspec testing

2008-01-18 Thread Al Chou
You can always spider the site (e.g., use Web Site Sucker on the Mac). Depending on which spider utility you use, you may have to do some manual editing afterward; Web Site Sucker, for instance, doesn't rewrite the absolute path to the CSS stylesheet into relative paths, which means that you do

Re: [rspec-users] Does mock_model's :null_object option work?

2007-12-05 Thread Al Chou
That's correct, I'm still on 1.0.8. Sorry for forgetting to mention that. I'm trying to keep some semblance of sanity as to knowing what versions of code I'm using, given how scattered I am about a subset of it (viz., Substruct). Al - Original Message From: David Chelimsky <[EMAIL PR

Re: [rspec-users] Does mock_model's :null_object option work?

2007-12-05 Thread Al Chou
Uh, shouldn't they both work? I use TRUE (and FALSE) because I like the facts that a) they stand out typographically and b) they are Ruby constants. I can't believe the case of the letters matters, unless you are doing something meta-programmingy rather than just passing the value through to

Re: [rspec-users] Does mock_model's :null_object option work?

2007-12-05 Thread Al Chou
Cool, I'll use mock for this purpose in the future! Al - Original Message From: Tom Stuart <[EMAIL PROTECTED]> To: rspec-users Sent: Wednesday, December 5, 2007 7:07:55 AM Subject: Re: [rspec-users] Does mock_model's :null_object option work? On 5 Dec 2007, at 14:5

[rspec-users] Does mock_model's :null_object option work?

2007-12-05 Thread Al Chou
Please understand in the following that I am making relatively minor changes to legacy (non-TDD/BDD) code in Substruct and don't have the time to refactor nicely right now. I'm just trying to get past the untested/un-speced cruft quickly to write the spec for my new code, so I'm looking for ex

Re: [rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
params not available for controller specs? On 4.12.2007, at 23.11, Al Chou wrote: > I think Jarkko is saying that no spec should have been written for > the code I was trying to fix/change. I'm not sure I would agree > that BDD/RSpec is an inappropriate tool for documenting w

Re: [rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
From: David Chelimsky <[EMAIL PROTECTED]> To: rspec-users Sent: Tuesday, December 4, 2007 12:18:58 PM Subject: Re: [rspec-users] params not available for controller specs? On Dec 4, 2007 2:09 PM, Al Chou <[EMAIL PROTECTED]> wrote: > > I get what you're saying, but I was try

Re: [rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
al Message From: Jarkko Laine <[EMAIL PROTECTED]> To: rspec-users Sent: Tuesday, December 4, 2007 10:09:01 AM Subject: Re: [rspec-users] params not available for controller specs? On 4.12.2007, at 18.19, Al Chou wrote: > Going back to my original message, I have the following at the

Re: [rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
s? On 4.12.2007, at 17.13, Al Chou wrote: > Ah, thanks! That was a breakthrough. My mock object "ids_string" > isn't receiving the method calls I expect (even though the code > under test actually does what I want it to do and works correctly), > but at least I&

Re: [rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
From: Daniel Tenner <[EMAIL PROTECTED]> To: rspec-users Sent: Tuesday, December 4, 2007 1:56:25 AM Subject: Re: [rspec-users] params not available for controller specs? Try: get :download, :ids => ids_string You need the ":" in front of the action name. Daniel On 4 Dec 2

Re: [rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
arkko Laine <[EMAIL PROTECTED]> To: rspec-users Sent: Tuesday, December 4, 2007 12:33:11 AM Subject: Re: [rspec-users] params not available for controller specs? On 4.12.2007, at 10.17, Al Chou wrote: > Hi, all, > > I'm trying to write a spec for a controller method that starts

[rspec-users] params not available for controller specs?

2007-12-04 Thread Al Chou
Hi, all, I'm trying to write a spec for a controller method that starts out: def download @orders = Order.find( params[:ids] ) ... and started writing a spec that set params[:ids] to a mock. I was surprised to discover that controller specs (at least in RSpec 1.0.8) don't offer the

Re: [rspec-users] confirming that a model instance was correctly created from POST params

2007-11-20 Thread Al Chou
nfirming that a model instance was correctly created from POST params On 20.11.2007, at 8.00, Al Chou wrote: > What I am trying to demonstrate to myself is that the addition of a > boolean "is_business_address" column to the order_addresses table > via a migration allows line

[rspec-users] confirming that a model instance was correctly created from POST params

2007-11-19 Thread Al Chou
I'm wondering whether I'm wasting my time trying to verify that an addition I've made to legacy code is in fact setting a new attribute on a model. Substruct's (http://dev.subimage.com/projects/substruct) OrderHelper contains this method: 1def create_order_from_post 2 @use_se

Re: [rspec-users] How do you specify a rubygem is being required?

2007-10-25 Thread Al Chou
Glad that was helpful! Al - Original Message From: Ashley Moran <[EMAIL PROTECTED]> To: rspec-users Sent: Thursday, October 25, 2007 12:01:11 PM Subject: Re: [rspec-users] How do you specify a rubygem is being required? On Oct 25, 2007, at 3:08 am, Al Chou wrote: > I be

Re: [rspec-users] How do you specify a rubygem is being required?

2007-10-24 Thread Al Chou
RubyGems does indeed muck with the "require" method. I believe the current version uses the "gem" method and deprecates the "require" method. Rails warns me about something to that effect whenever I run script/server, anyway. Not that I seem to have given you any real help with your spec quest