[rspec-users] should_receive working in before(:each) but not in example

2008-09-17 Thread Tim Haines
Hi there, I'm striking a wee problem - and haven't been able to figure it out. In my before statement I'm setting up a mock video. I'd like one of my examples to check that original= and save! are being called on the mock video, so I have an example that looks like this: it should update

Re: [rspec-users] should_receive working in before(:each) but not in example

2008-09-17 Thread Tim Haines
Lol. I need another coffee. The should's needed to be above the post. :-) Tim. On Thu, Sep 18, 2008 at 3:23 PM, Tim Haines [EMAIL PROTECTED] wrote: Hi there, I'm striking a wee problem - and haven't been able to figure it out. In my before statement I'm setting up a mock video. I'd like

Re: [rspec-users] Controller specs erroneously loading views in edge rails?

2008-09-03 Thread Tim Haines
Ian White has just submitted a patch for this. Thanks Ian. http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/516 Tim. On Wed, Sep 3, 2008 at 10:41 AM, Tim Haines [EMAIL PROTECTED] wrote: Hi guys, After updating to edge rails I've just struck this problem too. I've just grabbed

Re: [rspec-users] GiT and RSpec

2008-09-02 Thread Tim Haines
Hi James, Thanks for writing these instructions up in detail. I've just followed them and will play around with them over the next few days. A couple of questions 1) I assume with submodules I can create and switch to branches of the submodules if I want to try my app out with some patches

Re: [rspec-users] Controller specs erroneously loading views in edge rails?

2008-09-02 Thread Tim Haines
Hi guys, After updating to edge rails I've just struck this problem too. I've just grabbed fresh updates of rspec, rspec-rails, and rails and I'm receiving a few controller spec failures related to view rendering when views shouldn't be rendered (failures relate to mock objects not having

[rspec-users] specs pass when run with other app specs, but fail when run independently

2008-09-01 Thread Tim Haines
Hi there, I've noticed something a little odd with the session_controller specs that are generated from the rails plugin restful_authentication. When they're run with all the other app specs (i.e. when I first fire up autospec) the specs all pass. However, if I touch the session_controller_spec

Re: [rspec-users] specs pass when run with other app specs, but fail when run independently

2008-09-01 Thread Tim Haines
to use .send, or 3) remove the specs that are calling protected methods. Do you have any guidance on the best path forward here? Cheers, Tim. On Tue, Sep 2, 2008 at 3:15 PM, David Chelimsky [EMAIL PROTECTED]wrote: On Mon, Sep 1, 2008 at 6:22 PM, Tim Haines [EMAIL PROTECTED] wrote: Hi

Re: [rspec-users] specs pass when run with other app specs, but fail when run independently

2008-09-01 Thread Tim Haines
, Tim Haines [EMAIL PROTECTED] wrote: Hi there, I've noticed something a little odd with the session_controller specs that are generated from the rails plugin restful_authentication. When they're run with all the other app specs (i.e. when I first fire up autospec) the specs all pass

Re: [rspec-users] Rspec output and unicode

2008-04-26 Thread Tim Haines
Tiger, handles utf-8 katakana corrrectly w/ RSpec 1.1.3. Try following step If your're using DOS prompt: 1. Change Font to 'MS Gothic' on DOS prompt. 2. run command: chcp 65001 3. that's it. see also) http://www.mogya.com/blog/2007/11/utf8.html On Fri, Apr 25, 2008 at 11:46 PM, Tim Haines

[rspec-users] Rspec output and unicode

2008-04-25 Thread Tim Haines
Hey there, Rspec output (1.1.3) doesn't seem to be handling unicode characters correctly. I'm expecting to see Japanese katakana (on winXP) and I'm getting numbers instead - the byte representation of the katakana or something.. Should it be producing unicode if I have my environment set right?

[rspec-users] Creating stories for the second resource. Very wet approach

2008-04-10 Thread Tim Haines
Hi y'all I'm about to start writing up the stories for my second resource. The second resource is so similar to the first that I feel a good way for me to start might be to copy and paste the stories and edit from there. This seems very anti-dry though. Am I missing something obvious, or would

[rspec-users] newbq: Organizing your stories

2008-04-10 Thread Tim Haines
Hi, I'm a little unhappy with how my stories are organised, and am wondering if anyone has found any particular method nicest. I'm working within an admin namespace, and currently have a plain text story file for each controller in the admin folder. I also have a steps subfolder, with one step

Re: [rspec-users] Stories - Use view matchers rather than assigns[].should?

2008-04-10 Thread Tim Haines
I read about webrat and stories 30 mins ago - http://www.benmabey.com/2008/02/04/rspec-plain-text-stories-webrat-chunky-bacon/- good article. Tim. On 11/04/2008, Kamal Fariz [EMAIL PROTECTED] wrote: When I create a user with foo=bar is better because it doesn't expose the implementation.

Re: [rspec-users] Multi-line steps

2008-04-09 Thread Tim Haines
Hi Ashley, What's your use case? I'm curious... Tim. On 09/04/2008, Ashley Moran [EMAIL PROTECTED] wrote: Hi I just wondered what the plan was for multi-line steps. Is anyone working on it? I've just come across a real use for it (including small text files in the story). Cheers

Re: [rspec-users] Netbeans and .story files

2008-04-09 Thread Tim Haines
Here's the url - http://www.netbeans.org/issues/show_bug.cgi?id=131684 On 08/04/2008, Tim Haines [EMAIL PROTECTED] wrote: I sent the netbeans guys a list of features for story support in netbeans. With luck they'll make it into the next version after 6.1. Feel free to go check it out

Re: [rspec-users] Stories - Use view matchers rather than assigns[].should?

2008-04-09 Thread Tim Haines
(current_user=,..) a bit hacky right? So to make sure I only have 30 records showing when there's 40 in the db I should definitely be using have_tag.. Tim. On 10/04/2008, Pat Maddox [EMAIL PROTECTED] wrote: On Wed, Apr 9, 2008 at 7:37 PM, Tim Haines [EMAIL PROTECTED] wrote: Hi there, Just want

Re: [rspec-users] Netbeans and .story files

2008-04-07 Thread Tim Haines
I sent the netbeans guys a list of features for story support in netbeans. With luck they'll make it into the next version after 6.1. Feel free to go check it out and add to the list. :-) Cheers, Tim. On 8/04/2008, at 4:55, Ashley Moran [EMAIL PROTECTED] wrote: On 7 Apr 2008, at

[rspec-users] newb q: Can story steps report a view rendering error?

2008-04-02 Thread Tim Haines
Hi'ya I have a When step that calls get game_url. It turns out that calling this page is resulting in a render error, which explains my failing Then steps. It would help me if the story told me there was a problem rendering the response. Is there any way to get the story steps to automatically

Re: [rspec-users] problem rendering template with story

2008-04-02 Thread Tim Haines
persisted with it and now finally have a bunch of working stories... Tim. On 02/04/2008, Tim Haines [EMAIL PROTECTED] wrote: And I suspect this is because @first_render isn't being set for subsequent renders but it's time to go home now. On 02/04/2008, Tim Haines [EMAIL PROTECTED] wrote: Hi

[rspec-users] problem rendering template with story

2008-04-01 Thread Tim Haines
Hi y'all The problem is probably because I'm a newb. I have a home controller in the admin namespace. My controller spec is working as expected, and the following example is passing: it should show the home page if logged in do controller.send(current_user=, User.new) get :index

Re: [rspec-users] problem rendering template with story

2008-04-01 Thread Tim Haines
correctly after the later post.. Tim. On 02/04/2008, Tim Haines [EMAIL PROTECTED] wrote: Hi y'all The problem is probably because I'm a newb. I have a home controller in the admin namespace. My controller spec is working as expected, and the following example is passing: it should show

Re: [rspec-users] Given Logged In

2008-04-01 Thread Tim Haines
, Tim Haines [EMAIL PROTECTED] wrote: Hi there, Given my recent problems with .should render_template after a second post, I'm wondering if there's a way I set the state as logged in inside a given step without posting to sessions/create? Why not just post to sessions/create

Re: [rspec-users] Netbeans and .story files

2008-03-31 Thread Tim Haines
Hi Ashley, I don't think Netbeans has support for plain text stories yet - but I'm not certain (I was using it with frustration last night too). Probably better to ask in the netbeans forum? Cheers, tim. On 01/04/2008, Ashley Moran [EMAIL PROTECTED] wrote: On 31/03/2008, Steve Rogers [EMAIL

[rspec-users] Given .. and .. - And requires capitalisation

2008-03-31 Thread Tim Haines
Hi Guys, Just writing out a plain English story and was surprised to see one of my steps wasn't listed as pending. It turned out it was because I had started the line with and instead of And. Is there any reason why and shouldn't be an alias for And? Tim.

Re: [rspec-users] Given .. and .. - And requires capitalisation

2008-03-31 Thread Tim Haines
Cool.I didn't know about and and Ruby. :-) thanks! On 01/04/2008, Chuck Remes [EMAIL PROTECTED] wrote: On Mar 31, 2008, at 4:53 PM, Tim Haines wrote: Hi Guys, Just writing out a plain English story and was surprised to see one of my steps wasn't listed as pending. It turned out

Re: [rspec-users] Given .. and .. - And requires capitalisation

2008-03-31 Thread Tim Haines
, Chuck Remes [EMAIL PROTECTED] wrote: On Mar 31, 2008, at 4:53 PM, Tim Haines wrote: Hi Guys, Just writing out a plain English story and was surprised to see one of my steps wasn't listed as pending. It turned out it was because I had started the line with and instead

[rspec-users] spec'ing models

2008-03-31 Thread Tim Haines
Hi there, A couple of complete newb questions here. Should I be spec'ing the existence of attributes on models? While reading through the docs and googling I haven't seen any example that checks if attributes exist on a model. i.e. Game.Description. Likewise, what I've seen on spec'ing

Re: [rspec-users] spec'ing models

2008-03-31 Thread Tim Haines
, it's ActiveRecord code. You shouldnt need to test that. I have not been doing this. That said, I'd love to get the word from some people that have been doing it for a while. -- Matt Berther http://www.mattberther.com On Mar 31, 2008, at 6:21 PM, Tim Haines wrote: Hi there, A couple

Re: [rspec-users] spec'ing models

2008-03-31 Thread Tim Haines
way too much time on google at the moment. Tim.. On 01/04/2008, Tim Haines [EMAIL PROTECTED] wrote: Hey Matt, Cheers for that. Yeah - I'm not speccing methods like save, valid?, errors etc.. I am writing belongs_to though, so figure that should be specced somehow. I guess when I'm adding

[rspec-users] Pending Scenarios

2008-03-21 Thread Tim Haines
Hi there, newb q: The pending support for spec's and steps is nice. I'm just wondering why a scenario itself can't be pending? I.e. it seems to me like it would be nice to write up scenario titles for scenarios as you think of them, and for low-priority fringe scenarios leave the steps