[rspec-users] Specing raising error, handling, and then not raising error

2007-11-04 Thread Mikel Lindsaar
Hey guys and gals, I have a snippet of code: Net::SMTP(@host, @port, @from_domain) do |smtp| @emails.each do |email| begin smtp.send_message email.encoded, email.from, email.destinations @emails_sent += 1 rescue Exception => e # blah end end end What I want to d

Re: [rspec-users] RSpec, RESTful nested routes and :path_prefix

2007-11-04 Thread Harm Aarts
I do not believe that is the case here. I used 'script/genereate rspec_controller wiki::pages' and that generated spec files in 'spec/ controllers/wiki/pages_controller_spec.rb'. So that seemed to be in order. Excerpt: require File.dirname(__FILE__) + '/../../spec_helper' describe Wiki::Page

Re: [rspec-users] Specing raising error, handling, and then not raising error

2007-11-04 Thread Ashley Moran
On Nov 04, 2007, at 9:55 am, Mikel Lindsaar wrote: > it "should only increase the sent emails counter if the email was > sent" do >@smtp = mock(Net::SMTP) > > @smtp > .should_receive(:send_message).exactly(4).times.and_return(true, > IOError, true, true) >Net::SMTP.stub!(:start

Re: [rspec-users] RSpec, RESTful nested routes and :path_prefix

2007-11-04 Thread Nola Stowe
Hmm.. I do do have a controller with path_prefix that works. I wrote about a problem I am having in this thread, http://rubyforge.org/pipermail/rspec-users/2007-October/004202.html They do work, but for some reason I can get one of the named routes to work. If you want, email me the full page_co

Re: [rspec-users] RSpec Texmate Bundle errors

2007-11-04 Thread Hugh Watkins
This worked for me #From my rails project rm -rf vendor/plugins/rspec rm -rf vendor/plugins/rspec_on_rails ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec ruby script/plugin install svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec_on_rails ruby script/generate

Re: [rspec-users] Specing raising error, handling, and then not raising error

2007-11-04 Thread Mikel Lindsaar
On 11/5/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > Mikel, > > It looks like you are doing too much here. You are specifying sending > with the SMTP object in the same block you are specifying the > algorithm for counting the sent emails. Also, the way it interrogates > the email object to extr