Re: [rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread David Chelimsky
On Jan 30, 2011, at 5:53 PM, Jason Nah wrote: > On 31 January 2011 04:33, David Chelimsky wrote: > On Jan 30, 2011, at 9:34 AM, Rick DeNatale wrote: > > > On Sun, Jan 30, 2011 at 9:09 AM, David Chelimsky > > wrote: > >> You can either use mock_model or mock_stub > > > > > > David, > > > > Did

Re: [rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread Jason Nah
Thanks for that... although the exception still bugs me... and digging through the router code in rails is mighty obtuse. I'm switching over to rspec mocks to get me over this... (was using mocha). One problem I ran into, I'm testing a mailer (+ view), and I'm trying to generate the email ONCE f

Re: [rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread David Chelimsky
On Jan 30, 2011, at 9:34 AM, Rick DeNatale wrote: > On Sun, Jan 30, 2011 at 9:09 AM, David Chelimsky wrote: >> You can either use mock_model or mock_stub > > > David, > > Did you mean to say stub_model rather than mock_stub? Yes :) ___ rspec-users m

[rspec-users] undefined method `stub!' for

2011-01-30 Thread khelll
Hey, Using RSpec 2.4.0 with Rails 3.0.3 I'm doing this: rake spec:models and things works well. Now, when doing rspec spec/models/spot_spec.rb that has Spot.stub! :test1 I get: undefined method `stub!' for Spot:Class Am I missing something here?

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Rick DeNatale
On Sun, Jan 30, 2011 at 9:16 AM, David Chelimsky wrote: > On Jan 30, 2011, at 6:00 AM, Evgeniy Dolzhenko wrote: > >> On 1/30/2011 2:00 PM, Tom H. wrote: >>> Evgeniy Dolzhenko wrote in post #978481: Do you need the full source code of an example in the log output, or just a description? >

Re: [rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread Rick DeNatale
On Sun, Jan 30, 2011 at 9:09 AM, David Chelimsky wrote: > You can either use mock_model or mock_stub David, Did you mean to say stub_model rather than mock_stub? -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Github: http://github.com/rubyredrick Twitter: @RickDeNatale WWR: http

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread David Chelimsky
On Jan 30, 2011, at 6:00 AM, Evgeniy Dolzhenko wrote: > On 1/30/2011 2:00 PM, Tom H. wrote: >> Evgeniy Dolzhenko wrote in post #978481: >>> Do you need the full source code of an example in the log output, or >>> just a description? >> Just the description would be good so I can match up the log e

Re: [rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread David Chelimsky
On Jan 30, 2011, at 3:48 AM, Jason Nah wrote: > Howdy, > > I have emailed before about the inconsistencies I'm spotting when using named > routes/resource, but I think I've narrowed down the issue. It would seem this > has nothing to do with rspec per se, but more with how routing works with

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Tom H.
That worked a treat Thanks -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Evgeniy Dolzhenko
RSpec.configure do |c| c.before do |m| Rails.logger.debug "==> #{m.example.full_description}" end end Cheers On 1/30/2011 2:00 PM, Tom H. wrote: Evgeniy Dolzhenko wrote in post #978481: Do you need the full source code of an example in the log output, or just a description? Just the

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Tom H.
Evgeniy Dolzhenko wrote in post #978481: > Do you need the full source code of an example in the log output, or > just a description? Just the description would be good so I can match up the log entries to the spec -- Posted via http://www.ruby-forum.com/. __

Re: [rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Evgeniy Dolzhenko
Do you need the full source code of an example in the log output, or just a description? On 1/30/2011 12:16 PM, Tom H. wrote: This was asked back in 2008 but I'm wondering if there is an easier way with rspec2 and rails. Seems like it would make my test log much more meaningful. Surely somebody

[rspec-users] Named routes problem... more rails than rspec

2011-01-30 Thread Jason Nah
Howdy, I have emailed before about the inconsistencies I'm spotting when using named routes/resource, but I think I've narrowed down the issue. It would seem this has nothing to do with rspec per se, but more with how routing works with rails. If you have an object instance, that isn't saved and

[rspec-users] Is there an easy way to inject each example text into test.log

2011-01-30 Thread Tom H.
This was asked back in 2008 but I'm wondering if there is an easier way with rspec2 and rails. Seems like it would make my test log much more meaningful. Surely somebody must have done it. Is there an easy way to inject each example text into test.log so I can isolate the log output per example?