Re: [rspec-users] Failing in TextMate but not in rake...

2008-09-06 Thread Hunt Jon
http://wiki.macromates.com/Troubleshooting/RubyVersionIssue Hope this helps. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] do I use mocking (vs fixtures) for methods that produce results based on non-trivial SQL queries

2008-09-06 Thread Matt Wynne
On 5 Sep 2008, at 16:40, Ben Mabey wrote: Also - have you found a CI server that is working with git? On github you can find forks of cc.rb with added git support. I have been using it like a charm for months. In fact, the main thoughtworks github ccrb repo works with git now - we

Re: [rspec-users] scenarios on production data

2008-09-06 Thread Scott Taylor
On Sep 5, 2008, at 3:11 PM, Matt Wynne wrote: On 5 Sep 2008, at 19:14, Jonathan Linowes wrote: it just seems to me that while i'm running my tests on toy data sets, it could be reassuring to see the same run on real production data. Or, maybe not. I agree its not real scientific, but

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread David Chelimsky
On Fri, Sep 5, 2008 at 10:48 PM, Scott Taylor [EMAIL PROTECTED] wrote: On Sep 5, 2008, at 10:18 PM, Craig P Jolicoeur wrote: I'm having some trouble trying to spec some methods in my Rails application controller. I'm new to rspec converting over from straight test::unit. Here is the

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread Craig Jolicoeur
Thanks David. I changed to using get :render_403 and it worked. Well, worked after I added in those routes to my routes.rb file. I dont have the default routes for /:controller/:action/:id so it was failing and I dont want custom routes for these two methods because they will be called from

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread Craig Jolicoeur
First off - should_receive *is* a test - why would you write a test in the setup? Not sure what you mean by that. I'm not writing a test in the setup routine. Also, I'm not setting an expectation on a method call. should render_file is in the right place. On Sep 5, 11:48 pm, Scott Taylor

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 8:55 AM, Craig Jolicoeur [EMAIL PROTECTED] wrote: First off - should_receive *is* a test - why would you write a test in the setup? Not sure what you mean by that. I'm not writing a test in the setup routine. should_receive is an expectation which could pass or fail. I

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 9:15 AM, Craig Jolicoeur [EMAIL PROTECTED] wrote: Thanks David. I changed to using get :render_403 and it worked. Well, worked after I added in those routes to my routes.rb file. I dont have the default routes for /:controller/:action/:id so it was failing and I dont

Re: [rspec-users] Testing file attachment with Paperclip

2008-09-06 Thread Neil Cauldwell
Rick Denatale wrote: On Mon, Jun 9, 2008 at 8:18 AM, Nicholas Wieland [EMAIL PROTECTED] wrote: I haven't been clear enough, my point is not to fake the file upload (there's also fixture_file_upload for that) but to fake the receiver, making it dumb enough to avoid performing every

Re: [rspec-users] issue with application controller spec

2008-09-06 Thread Craig Jolicoeur
I think part of my problem, now that I think about it, is that I'm trying to test the method instead of testing behavior. This render_403 method should probably not be tested directly from the application_controller_spec since it doesnt get actually called their. I should test the render method

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread Nick Hoffman
On 2008-09-05, at 18:22, Jonathan Linowes wrote: On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote: Property.stub!(:find).and_return mock_property1, mock_property2 try Property.stub!(:find).and_return( [mock_property1, mock_property2] ) Thanks Jonathan and David. That was a silly mistake.

Re: [rspec-users] Failing in TextMate but not in rake...

2008-09-06 Thread ed_ruder
Thanks! Solved the problem completely! Here are the relevant steps: 1. Create the ~/.MacOSX directory if it doesn't already exist. 2. Using the Property List Editor (in /Developer/Applications/ Utilities), edit the ~/.MacOSX/environment.plist file (creating it if it doesn't already exist). 3.

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 2:32 PM, Nick Hoffman [EMAIL PROTECTED] wrote: On 2008-09-05, at 18:22, Jonathan Linowes wrote: On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote: Property.stub!(:find).and_return mock_property1, mock_property2 try Property.stub!(:find).and_return( [mock_property1,

Re: [rspec-users] Failing in TextMate but not in rake...

2008-09-06 Thread Greg Hauptmann
thanks Ed, I too can now see the nice colored output summary for rspec in textmate, however... What is weird is the following. Any ideas? [A] - MENU BEHAVE DIFFERENTLY TO THE KEYBOARD SHORTCUTS: When I: (a) Run the rspec commands via the TextMate menu using my mouse, e.g. Bundle = RSpec =

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread Nick Hoffman
On 2008-09-06, at 15:58, David Chelimsky wrote: Well, without changing the underlying semantics, you can clean up the syntax a bit like this: mock_property1 = stub('property', :address = '400 Bloor Street', :latitude = 12.34, :longitude = 56.78) Of course, that doesn't address your question

Re: [rspec-users] How to spec the existence of specs

2008-09-06 Thread Nick Hoffman
On 2008-08-31, at 15:40, Joseph Wilk wrote: I've been giving this some thought, I've not had the chance to test it out yet, but here are my examples: -- it should add a 'it' test do example_group = Class.new(Spec::Example::ExampleGroup) example_group.should_receive(:it).with(...) ...

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread Mark Wilden
203 204 map.should_receive(:add_marker).with mock_property1.address, mock_property1.latitude, mock_property1.longitude, marker1_contents 205 map.should_receive(:add_marker).with mock_property2.address, mock_property2.latitude, mock_property2.longitude, marker2_contents It looks

Re: [rspec-users] Failing in TextMate but not in rake...

2008-09-06 Thread ed_ruder
Greg, Each of your issues run correctly for me, from both the menu and the keyboard shortcut. One question: is the language in the menu at the bottom of your spec file set to RSpec? That does affect which keyboard shortcuts are active. Ed On Sep 6, 2:45 pm, Greg Hauptmann [EMAIL PROTECTED]

Re: [rspec-users] Failing in TextMate but not in rake...

2008-09-06 Thread Greg Hauptmann
doh! thanks Ed, you got it in one :) It was set to Ruby not Rspec. On Sun, Sep 7, 2008 at 8:35 AM, ed_ruder [EMAIL PROTECTED] wrote: Greg, Each of your issues run correctly for me, from both the menu and the keyboard shortcut. One question: is the language in the menu at the bottom

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 4:48 PM, Nick Hoffman [EMAIL PROTECTED] wrote: On 2008-09-06, at 15:58, David Chelimsky wrote: Well, without changing the underlying semantics, you can clean up the syntax a bit like this: mock_property1 = stub('property', :address = '400 Bloor Street', :latitude =

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 5:25 PM, Mark Wilden [EMAIL PROTECTED] wrote: 203 204 map.should_receive(:add_marker).with mock_property1.address, mock_property1.latitude, mock_property1.longitude, marker1_contents 205 map.should_receive(:add_marker).with mock_property2.address,

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-06 Thread David Chelimsky
On Sat, Sep 6, 2008 at 9:57 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Sat, Sep 6, 2008 at 4:48 PM, Nick Hoffman [EMAIL PROTECTED] wrote: On 2008-09-06, at 15:58, David Chelimsky wrote: Well, without changing the underlying semantics, you can clean up the syntax a bit like this: