Re: [rspec-users] Mock/stub ActiveMerchant? (or other cascading/multiple inheritance situation)

2011-04-29 Thread David Kahn
On Fri, Apr 29, 2011 at 10:05 PM, Rodrigo Rosenfeld Rosas < lboc...@yahoo.com.br> wrote: > Em 29-04-2011 13:15, David Kahn escreveu: > > > > On Thu, Apr 28, 2011 at 8:03 PM, Pat Maddox wrote: > >> On Apr 28, 2011, at 4:37 PM, David Kahn wrote: >> >> &

Re: [rspec-users] Mock/stub ActiveMerchant? (or other cascading/multiple inheritance situation)

2011-04-29 Thread David Kahn
On Thu, Apr 28, 2011 at 8:03 PM, Pat Maddox wrote: > On Apr 28, 2011, at 4:37 PM, David Kahn wrote: > > > I am a bit new to mocking. I am trying to stub the > ActiveMerchant::Billing::PaypalGateway#authorize method but not clear how to > do it. This is my code and spec. &

[rspec-users] Mock/stub ActiveMerchant? (or other cascading/multiple inheritance situation)

2011-04-28 Thread David Kahn
I am a bit new to mocking. I am trying to stub the ActiveMerchant::Billing::PaypalGateway#authorize method but not clear how to do it. This is my code and spec. This is the pertinent code: module Payment def gateway ActiveMerchant::Billing::PaypalGateway.new( ... ) end def au

Re: [rspec-users] before(:each) <- need some clarification

2011-04-27 Thread David Kahn
On Wed, Apr 27, 2011 at 2:55 PM, Sergio Ruiz wrote: > i am setting up a few objects that are interrelated for use in an rspec > test.. > > something like: > > describe Dimension do > > before(:each) do > text = "string here" > end > > it "should puts string" do > puts text > end > > end > > whe

Re: [rspec-users] RSpec Basic Help Needed

2011-03-18 Thread David Kahn
On Fri, Mar 18, 2011 at 12:34 PM, Will C. wrote: > I'm getting the following error while doing the RSpec example on the > bottom of this page: http://rspec.info/ > > This is the error I am getting > no such file to load -- blowing LoadError > Do you have the file named right? (I see 'blowing' ab

[rspec-users] Testing route with proc --- possible and how?

2011-03-17 Thread David Kahn
I have this route (Rails 3) which handles redirecting shortened urls: # handles the shortened url lookup match ':hash' => redirect { |params| Sharing.get_url_path_by_short_url(params[:hash]) }, :constraints => { :hash => /[a-zA-Z0-9]{7}/ } It works correctly at the ui. However am having troub

Re: [rspec-users] Rails 3 Upgrade

2011-03-05 Thread David Kahn
On Tue, Mar 1, 2011 at 7:33 PM, Lakshmanan wrote: > Hi, > > I am upgrading a rails 2.1.0 app to Rails 3. Just a note, you may want to try upgrading first to the latest Rails 2 (is it still 2.3.9?) version. You will still have a lot to do jumping between the latest 2 and 3 but seems that a lot o

Re: [rspec-users] Possible to ask rspec to show more code in the debugger?

2011-02-08 Thread David Kahn
On Thu, Feb 3, 2011 at 2:42 PM, Rick DeNatale wrote: > On Thu, Feb 3, 2011 at 1:40 PM, David Kahn > wrote: > > This came up from an other issue where I needed to go check something in > > test::unit. Immediately when I dropped into the debugger in test::unit I > saw >

Re: [rspec-users] Is there a way to tell rspec not to fail the test while in debugger?

2011-02-03 Thread David Kahn
On Thu, Feb 3, 2011 at 11:24 AM, David Chelimsky wrote: > On Feb 3, 2011, at 11:04 AM, David Kahn wrote: > > > > On Thu, Feb 3, 2011 at 10:32 AM, David Chelimsky wrote: > >> On Feb 3, 2011, at 9:28 AM, David Kahn wrote: >> >> On Thu, Feb 3, 2011 at 8:48 AM, Sco

[rspec-users] Possible to ask rspec to show more code in the debugger?

2011-02-03 Thread David Kahn
This came up from an other issue where I needed to go check something in test::unit. Immediately when I dropped into the debugger in test::unit I saw something I have been missing: test unit by default shows a number of lines of code. Is there a way to make the rspec debugger do this? I am not sur

Re: [rspec-users] Is there a way to tell rspec not to fail the test while in debugger?

2011-02-03 Thread David Kahn
On Thu, Feb 3, 2011 at 10:32 AM, David Chelimsky wrote: > On Feb 3, 2011, at 9:28 AM, David Kahn wrote: > > On Thu, Feb 3, 2011 at 8:48 AM, Scott Taylor wrote: > >> >> Probably manually rescuing your debugger call would work: >> >> begin >> debugger &

Re: [rspec-users] Is there a way to tell rspec not to fail the test while in debugger?

2011-02-03 Thread David Kahn
ferent methodology but I depend a lot on working stuff out in the debugger. > > Scott > > On Feb 3, 2011, at 9:18 AM, David Kahn wrote: > > > I am curious as with Test::Unit I could go into the debugger and stay all > day inside of a test and make all kinds of errors without a p

[rspec-users] Is there a way to tell rspec not to fail the test while in debugger?

2011-02-03 Thread David Kahn
I am curious as with Test::Unit I could go into the debugger and stay all day inside of a test and make all kinds of errors without a problem. With rspec I experience that if I make a bad query/ActiveRecord call that it flips out and fails the test, throwing me back to the command prompt. This is n

Re: [rspec-users] Best Practice for Controllers

2011-01-21 Thread David Kahn
On Mon, Jan 17, 2011 at 1:43 PM, David Chelimsky wrote: > On Jan 17, 2011, at 10:16 AM, David Kahn wrote: > > On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants wrote: > >> Hello all, >> >> From what I've seen, this type of question doesn't really seem to get

Re: [rspec-users] Best Practice for Controllers

2011-01-17 Thread David Kahn
On Mon, Jan 17, 2011 at 9:48 AM, Ants Pants wrote: > Hello all, > > From what I've seen, this type of question doesn't really seem to get an > answer on this list as most of the replies relate to failures of RSpec. If > this is the case, where is the best place to go to get advice about best > pra

Re: [rspec-users] Configuring RSpec for Integration Test

2010-12-18 Thread David Kahn
On Sat, Dec 18, 2010 at 2:47 PM, David Chelimsky wrote: > On Dec 18, 2010, at 2:11 PM, Sarah Allen wrote: > > > In using RSpec for integration testing with Capybara, I was surprised > > thave I needed to do extra configuration. I started with the config > > from this blog post: > > http://codingf

Re: [rspec-users] Rescuing a Test-Free Project with RSpec and Cucumber

2010-12-11 Thread David Kahn
On first thought what I would do since you have the project running in production is to write all your Features and get them to pass on the existing production application. That gives you a reality test on each piece you change as you rebuilt. You have an additional challenge being in Rails 2 and w

Re: [rspec-users] Rspec: `should': uninitialized constant RSpec::Expectations (NameError)

2010-12-07 Thread David Kahn
Wincent Colaiuta wrote in post #966456: > El 06/12/2010, a las 01:19, DK escribi: > >> Hi all, anyone have an idea why I am getting an error trying to 'rake >> spec': >> >> 'kernel.rb:27:in `should': uninitialized constant RSpec::Expectations >> (NameError)'. > > Can you paste the full backtrace an

[rspec-users] Change setting to receive emails when posted?

2010-12-06 Thread David Kahn
This is an administrative question: I joined this group yesterday and when I try to save my preferences it does not allow me to select "Email (approximately 12 emails per day)" is it just me or does everyone just get a digest (I would rather have things in real time)... Thanks, David