Re: [rspec-users] ApplicationHelper

2008-03-20 Thread James Deville
That shouldn't be needed. In my spec's it works fine. does: describe ApplicationHelper do it doesn't find what it's looking for do helper.distribute(1,2,3,[4,5,6]).should eql([1,2,3]) end end work? I know that there was some talk of introducing an explicit helper object on the list. JD

Re: [rspec-users] Why not MockEverthing or why use fixtures for all tests?

2008-03-18 Thread James Deville
unwanted side effects. I should be able to delete a record any way I please (delete, destroy, connection().execute(...)) and the test should pass. However, each of those have different behaviour, and that is what I am spec'ing when I do model.should_receive(:destroy) James Deville

Re: [rspec-users] Problem with mocking a simple has_many relationship

2008-03-18 Thread James Deville
On Mar 18, 2008, at 4:26 PM, Nikos Dimitrakopoulos wrote: Hi there all. Sorry if the question sounds silly but i'm rather new at the 'mocking' stuff... So here is my problem (code helps more than talking): the model: class Item ActiveRecord::Base ... has_many :images, :dependent =

Re: [rspec-users] Problem with mocking a simple has_many relationship

2008-03-18 Thread James Deville
Doh! I can't believe that I missed that. You can also use if self.images.size.zero? Just a little more readable. James Deville On Mar 18, 2008, at 4:38 PM, Rafael Mueller wrote: Hi Nikos, On Tue, Mar 18, 2008 at 8:26 PM, Nikos Dimitrakopoulos [EMAIL PROTECTED] wrote: the model: class

Re: [rspec-users] Stories (well, integration tests) which aren't plain text

2008-03-13 Thread James Deville
Google for some of the stuff about story runner. It was originally not plain text, that's just a convenience. There are some earlier tutorials on David's blog about just doing stories. JD On Mar 13, 2008, at 9:11 AM, Rob Holland wrote: Hi, Having just played with getting my first plain

Re: [rspec-users] running a specific describe block

2008-03-12 Thread James Deville
/support_spec.rb -e should validate presence of attachment . Finished in 0.379727 seconds 1 example, 0 failures Seems like a nested-example-group bug. Would you kindly submit this as a report to http://rspec.lighthouseapp.com? Cheers, David - Original Message From: James

Re: [rspec-users] rspec groups?

2008-03-11 Thread James Deville
http://rubyforge.org/mailman/listinfo/rspec-users James Deville http://devillecompanies.org [EMAIL PROTECTED] rspec r3172 rspec_on_rails r3172 rails r8331 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo

Re: [rspec-users] running a specific describe block

2008-03-11 Thread James Deville
___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users James Deville http://devillecompanies.org [EMAIL PROTECTED] rspec r3172 rspec_on_rails r3172 rails r8331 ___ rspec-users mailing

Re: [rspec-users] render_to_string in a controller test?

2008-02-19 Thread James Deville
. Perhaps there should be a way to allow render_to_string to render a without making all views render. WDYT? James Deville http://devillecompanies.org [EMAIL PROTECTED] rspec r3172 rspec_on_rails r3172 rails r8331 FWIW, David Thanks for your input, e. -- [EMAIL PROTECTED

Re: [rspec-users] RSpec and the Basecamp API

2008-01-31 Thread James Deville
-tp15205668p15205668.html Sent from the rspec-users mailing list archive at Nabble.com. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users James Deville http://devillecompanies.org [EMAIL PROTECTED

Re: [rspec-users] reby-debug and rspec

2008-01-30 Thread James Deville
the options for the program being debugged. -- Rick DeNatale My blog on Ruby http://talklikeaduck.denhaven2.com/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users James Deville http

Re: [rspec-users] Textmate RSpec Bundle 'it' snippet

2008-01-28 Thread James Deville
the block out and just write: it should bla bla No 'do', no 'end'. The example will be pending this way. François ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users James Deville http

Re: [rspec-users] Story runner macros

2008-01-25 Thread James Deville
It sounds like what you really want is the plain text stories. David has a few good articles, and there have been some good ones on this list. JD On Jan 20, 2008, at 9:09 PM, Rick DeNatale wrote: I've gotten quite a bit out of Pat Maddox's screencast

Re: [rspec-users] Shoulda

2008-01-10 Thread James Deville
Speaking for myself, since I support the same philosophy, I wouldn't test the association. I don't care that it has_many posts. I might care that I can add multiple posts, or that I can find posts by criteria, so I would test that. JD On Jan 10, 2008, at 4:04 PM, Jonathan Leighton wrote:

Re: [rspec-users] Shoulda

2008-01-10 Thread James Deville
://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users Hop! James Deville http://devillecompanies.org [EMAIL PROTECTED] rspec r3172 rspec_on_rails r3172

Re: [rspec-users] Story runner rake task

2007-12-21 Thread James Deville
On Dec 19, 2007, at 10:42 PM, David Chelimsky wrote: On Dec 20, 2007 12:25 AM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 10:16 PM, David Chelimsky wrote: On Dec 19, 2007 11:50 PM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 9:44 PM, David Chelimsky

[rspec-users] Story runner rake task

2007-12-19 Thread James Deville
What's the status on a rake task for the story runner. If nothing is in progress, where could I start to try and build one? JD ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Story runner rake task

2007-12-19 Thread James Deville
Yeah, had a slight email conversation with David C about that in regards to bug #188. I am wondering why we don't standardize it, ya know convention over configuration and all. JD On Dec 19, 2007, at 6:28 PM, Josh Knowles wrote: On 12/19/07, James Deville [EMAIL PROTECTED] wrote: What's

Re: [rspec-users] Story runner rake task

2007-12-19 Thread James Deville
What file is that in? I was looking for one in trunk earlier. JD On Dec 19, 2007, at 5:07 PM, Ben Mabey wrote: Ben Mabey wrote: James Deville wrote: What's the status on a rake task for the story runner. If nothing is in progress, where could I start to try and build one? JD

Re: [rspec-users] Story runner rake task

2007-12-19 Thread James Deville
On Dec 19, 2007, at 9:38 PM, David Chelimsky wrote: On Dec 19, 2007 11:34 PM, James Deville [EMAIL PROTECTED] wrote: Yeah, had a slight email conversation with David C about that in regards to bug #188. I am wondering why we don't standardize it, ya know convention over configuration

Re: [rspec-users] Story runner rake task

2007-12-19 Thread James Deville
On Dec 19, 2007, at 9:44 PM, David Chelimsky wrote: On Dec 19, 2007 11:40 PM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 9:38 PM, David Chelimsky wrote: On Dec 19, 2007 11:34 PM, James Deville [EMAIL PROTECTED] wrote: Yeah, had a slight email conversation with David C

Re: [rspec-users] Story runner rake task

2007-12-19 Thread James Deville
On Dec 19, 2007, at 10:16 PM, David Chelimsky wrote: On Dec 19, 2007 11:50 PM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 9:44 PM, David Chelimsky wrote: On Dec 19, 2007 11:40 PM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 9:38 PM, David Chelimsky

Re: [rspec-users] Story runner rake task

2007-12-19 Thread James Deville
On Dec 19, 2007, at 10:42 PM, David Chelimsky wrote: On Dec 20, 2007 12:25 AM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 10:16 PM, David Chelimsky wrote: On Dec 19, 2007 11:50 PM, James Deville [EMAIL PROTECTED] wrote: On Dec 19, 2007, at 9:44 PM, David Chelimsky

Re: [rspec-users] [rspec-devel] rspec_on_rails (trunk - r3070) works with Rails 2.0.1

2007-12-08 Thread James Deville
is in a lib file that isn't directly loaded into the specs. It is a convenience method: def test?; RAILS_ENV==test;end I don't know why this method is being included in my tests, every context has it as an example. Any ideas? Jim D On Dec 8, 2007, at 8:42 PM, James Deville wrote: Begin

Re: [rspec-users] Note on Rails 2.0 Preview

2007-10-29 Thread James Deville
On 10/29/07, Jamal Soueidan [EMAIL PROTECTED] wrote: Steve Ross (CWD) wrote: Make sure you get a relatively current version of rspec or you will get: /Users/me/rails/ubb/vendor/rails/activerecord/lib/../../activesupport/ lib/active_support/dependencies.rb:263:in `load_missing_constant':