[rspec-users] form_for url

2008-09-12 Thread Jonathan Linowes
hi, I'm specing a view that contains <% form_for @page, :url => { :action => :update },... and get the error No route matches {:action=>"update"} In the spec, I've tried several things, including it "should work" do assigns[:page] = mock_model(Page) request.env["HTTP_REFERER"] = "/pa

Re: [rspec-users] Growl notifications don't work each time??

2008-09-12 Thread Scott Taylor
On Sep 12, 2008, at 11:25 PM, Zach Dennis wrote: On Fri, Sep 12, 2008 at 11:11 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: On Sep 12, 2008, at 1:38 AM, Pat Maddox wrote: "Greg Hauptmann" <[EMAIL PROTECTED]> writes: Hi - has anyone had problems with Growl notifications not working each t

Re: [rspec-users] Growl notifications don't work each time??

2008-09-12 Thread Zach Dennis
On Fri, Sep 12, 2008 at 11:11 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Sep 12, 2008, at 1:38 AM, Pat Maddox wrote: > >> "Greg Hauptmann" <[EMAIL PROTECTED]> writes: >> >>> Hi - has anyone had problems with Growl notifications not working each >>> time? I can hit save on a test, wait, che

Re: [rspec-users] mocking the shell command (Kernel module)

2008-09-12 Thread Scott Taylor
On Sep 12, 2008, at 9:29 AM, Matt Wynne wrote: On 12 Sep 2008, at 14:12, Joaquin Rivera Padron wrote: what is the best (or any) way of mocking the running of shell commands? e.g. code like the following: def method %{ ls } end spec: it "should list the directory contents" shell = mo

Re: [rspec-users] Growl notifications don't work each time??

2008-09-12 Thread Scott Taylor
On Sep 12, 2008, at 1:38 AM, Pat Maddox wrote: "Greg Hauptmann" <[EMAIL PROTECTED]> writes: Hi - has anyone had problems with Growl notifications not working each time? I can hit save on a test, wait, check. Then hit save again, wait, check. Sometimes the growl notification doesn't work.

Re: [rspec-users] booting rails routing without a controller call

2008-09-12 Thread Matt Wynne
Worked perfectly, thank you. By moving our routes config into lib/routing/default_routes.rb, I can also get autotest to watch the file for changes - double bonus! On 12 Sep 2008, at 17:21, David Chelimsky wrote: On Fri, Sep 12, 2008 at 11:17 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: We're

Re: [rspec-users] cucumber gem install

2008-09-12 Thread Matt Wynne
On 12 Sep 2008, at 22:37, Damian Jones wrote: David Chelimsky wrote: On Fri, Sep 12, 2008 at 7:46 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote: C:\>gem install aslakhellesoy-cucumber Please get it with Git and build the gem yourself in the meanwhile. For anyone who's not sure about how to do

[rspec-users] cucumber setup and teardown

2008-09-12 Thread Ben Mabey
Hi all, I added a section to Cucumber's wiki about converting StoryListeners into Cucumber's API. Since I'm still learning my self I'd appreciate it if someone could look at what I wrote and make sure I didn't miss anything. http://github.com/aslakhellesoy/cucumber/wikis/migration-from-rspec-stori

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
On Sep 12, 2008, at 4:01 PM, Joseph Wilk wrote: I agree there is difficulty with FIT values and bindings. I find using good descriptive columns names really helps Couldn't agree more there. and quoting bound values in the plain text. I find this much easier to match up: Given a 'Widget' Wh

Re: [rspec-users] cucumber gem install

2008-09-12 Thread Damian Jones
David Chelimsky wrote: > On Fri, Sep 12, 2008 at 7:46 AM, aslak hellesoy > <[EMAIL PROTECTED]> wrote: >>> C:\>gem install aslakhellesoy-cucumber >> Please get it with Git and build the gem yourself in the meanwhile. > For anyone who's not sure about how to do that: > > git clone git://github.com/a

Re: [rspec-users] RSpec in Rails -- HTTP methods

2008-09-12 Thread tastapod
+1 for ramaze. The gem also installs some lovely example apps and they use rspec for their development, so there are plenty of example specs both at the code and integration (web) level. I've not been writing ruby web apps in anger but for all the little example apps I write I've been using ramaze

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Joseph Wilk
Evan David Light wrote: > On Sep 12, 2008, at 12:26 PM, David Chelimsky wrote: > >>> I believe that binding the table to the phrasing would be >>> immensely >>> useful and perhaps even crucial to Scenario authors. >> >> Can you give an example of how this would be helpful? >> > > I'll try

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread Damian Jones
When ever I try to install a plugin from a git repository I just get: removing: ../vendor/plugins/cucumber/.git is this because I am on windows, or is there something I need to do? -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list

Re: [rspec-users] RSpec in Rails -- HTTP methods

2008-09-12 Thread Mark Dodwell
Many thanks for the info, that certainly clarifies things! ~ Mark -- 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] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 11:22 AM, Damian Jones <[EMAIL PROTECTED]> wrote: > David Chelimsky wrote: > >> To make that transition easy for you, I'd recommend either moving to >> cucumber now, or at least taking the "decoupled step definitions" >> approach within Story Runner. Check out http://pastie.

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
On Sep 12, 2008, at 12:26 PM, David Chelimsky wrote: I believe that binding the table to the phrasing would be immensely useful and perhaps even crucial to Scenario authors. Can you give an example of how this would be helpful? I'll try. Let's define a couple of roles for, the sake

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread Damian Jones
Phew, Thanks all for the input. Just need an outside eye to help me find a stupid mistake. I am using JEdit (on a windows box, unfortunately can't afford a Mac at the moment!) I had renamed Views/Product to Views/Products in JEdit but didn't realise it doesn't update the actual file system.

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 11:37 AM, David Chelimsky <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 11:22 AM, Damian Jones <[EMAIL PROTECTED]> wrote: >> David Chelimsky wrote: >> >>> To make that transition easy for you, I'd recommend either moving to >>> cucumber now, or at least taking the "de

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread Damian Jones
David Chelimsky wrote: > To make that transition easy for you, I'd recommend either moving to > cucumber now, or at least taking the "decoupled step definitions" > approach within Story Runner. Check out http://pastie.org/271244 (with > the steps, story and output) and let me know if it makes sens

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 11:19 AM, Evan David Light <[EMAIL PROTECTED]> wrote: > > On Sep 12, 2008, at 12:14 PM, David Chelimsky wrote: > >> What you're proposing might look this: >> >> Scenario: division >> Given a numerator >> And a denominator >> Then the calculator should provide a quotient >

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
On Sep 12, 2008, at 12:19 PM, David Chelimsky wrote: On Fri, Sep 12, 2008 at 11:16 AM, Evan David Light <[EMAIL PROTECTED]> wrote: On Sep 12, 2008, at 11:50 AM, David Chelimsky wrote: I commented on your blog. Yup, I know. I know very well who you are, David. ;-) I've seen you speak

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 11:16 AM, Evan David Light <[EMAIL PROTECTED]> wrote: > > On Sep 12, 2008, at 11:50 AM, David Chelimsky wrote: > >> I commented on your blog. > > > Yup, I know. I know very well who you are, David. ;-) I've seen you speak > a few times and even chatted with you briefly out

Re: [rspec-users] booting rails routing without a controller call

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 11:17 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: > We're getting into some quite complex routing, and I'd like to be able to > spec the routing on its own. > All our controllers tend to have a little call to like this to boot up the > routing before testing params_from etc: >

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
On Sep 12, 2008, at 12:14 PM, David Chelimsky wrote: What you're proposing might look this: Scenario: division Given a numerator And a denominator Then the calculator should provide a quotient |numerator|denominator|quotient| This will put some constraints on the phrasing that might be a

[rspec-users] booting rails routing without a controller call

2008-09-12 Thread Matt Wynne
We're getting into some quite complex routing, and I'd like to be able to spec the routing on its own. All our controllers tend to have a little call to like this to boot up the routing before testing params_from etc: get :index However I can't get this to work in a spec that doesn

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
On Sep 12, 2008, at 11:50 AM, David Chelimsky wrote: I commented on your blog. Yup, I know. I know very well who you are, David. ;-) I've seen you speak a few times and even chatted with you briefly outside RailsConf '08 about this crazy idea that I had to redo RSpec Plain Text Stories

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 11:04 AM, Evan David Light <[EMAIL PROTECTED]> wrote: > > On Sep 12, 2008, at 11:51 AM, David Chelimsky wrote: > >> Please keep in mind that this is an *additional* way to do things - >> you can still write your steps exactly as you do in Story Runner, >> using regexps. > >

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 10:35 AM, Evan David Light <[EMAIL PROTECTED]> wrote: > Last night, I gave a presentation to the DC Ruby Users Group > (http://dcrug.org) on Plain Text Stories with Ruby. I spoke on both RSpec > Plain Text Stories, which I have used, and Cucumber which I started to dig > in

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
On Sep 12, 2008, at 11:51 AM, David Chelimsky wrote: Please keep in mind that this is an *additional* way to do things - you can still write your steps exactly as you do in Story Runner, using regexps. Ah, good point. I missed that nuance in your comment on my blog. Perhaps the presence of

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 10:35 AM, Evan David Light <[EMAIL PROTECTED]> wrote: > Last night, I gave a presentation to the DC Ruby Users Group > (http://dcrug.org) on Plain Text Stories with Ruby. I spoke on both RSpec > Plain Text Stories, which I have used, and Cucumber which I started to dig > in

Re: [rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Pat Maddox
I agree. Seems much more useful to me to think of the first one as being a template that stuff gets plugged in to. Pat ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Cucumber Scenario syntax

2008-09-12 Thread Evan David Light
Last night, I gave a presentation to the DC Ruby Users Group (http://dcrug.org ) on Plain Text Stories with Ruby. I spoke on both RSpec Plain Text Stories, which I have used, and Cucumber which I started to dig into a couple of nights ago. You can see the presentation here (http://evan.tigge

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 10:01 AM, Pat Maddox <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 10:58 AM, Damian Jones <[EMAIL PROTECTED]> wrote: >> David >> >> Are you saying this part should work: >> >> And "the page should show", "Product 1" do |text| >> response.should have_text(/#{text}/) >

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread Pat Maddox
On Fri, Sep 12, 2008 at 10:58 AM, Damian Jones <[EMAIL PROTECTED]> wrote: > David > > Are you saying this part should work: > > And "the page should show", "Product 1" do |text| > response.should have_text(/#{text}/) > end > > because I'm getting nil for this step too. Is the request actually com

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread Damian Jones
David Are you saying this part should work: And "the page should show", "Product 1" do |text| response.should have_text(/#{text}/) end because I'm getting nil for this step too. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list

Re: [rspec-users] mocking named_scope utilization

2008-09-12 Thread Juanma Cervera
Very clear. Thank you very much Pat! -- 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] mocking named_scope utilization

2008-09-12 Thread Pat Maddox
On Fri, Sep 12, 2008 at 5:20 AM, Juanma Cervera <[EMAIL PROTECTED]> wrote: > Hello, > I am having trouble to mock the chaining of named_scope in the > controller, also I would like to use will_paginate. > > def index > @things = Thing.allowed_for(@current_user).available.paginate :page => > params

Re: [rspec-users] cucumber gem install

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 7:46 AM, aslak hellesoy <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 1:52 PM, aidy lewis <[EMAIL PROTECTED]> wrote: >> Hi, >> >> I am having problem with the cucumber gem install >> >> gem sources --add http://gems.github.com/ >> gem install aslakhellesoy-cucumber >>

Re: [rspec-users] mocking named_scope use in controllers

2008-09-12 Thread Juanma Cervera
Maybe "utilization" is not correct an english word. I'm not sure. I would change the words in the subject Juanma Cervera -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listi

Re: [rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread David Chelimsky
On Fri, Sep 12, 2008 at 8:56 AM, Damian Jones <[EMAIL PROTECTED]> wrote: > This is my story: > > require File.expand_path(File.dirname(__FILE__) + "/helper") > > Story "Creating a Product", %{ >As a User >I want to create a product >So that I can collect purchase options tog

Re: [rspec-users] mocking the shell command (Kernel module)

2008-09-12 Thread Joaquin Rivera Padron
thanks, I'll give that a try joaquin 2008/9/12 Matt Wynne <[EMAIL PROTECTED]> > On 12 Sep 2008, at 14:12, Joaquin Rivera Padron wrote: > > what is the best (or any) way of mocking the running of shell commands? > > e.g. > code like the following: > > def method > %{ ls } > end > > spec: > > it

[rspec-users] RSpec story failing because create is not rendering 'show'

2008-09-12 Thread Damian Jones
This is my story: require File.expand_path(File.dirname(__FILE__) + "/helper") Story "Creating a Product", %{ As a User I want to create a product So that I can collect purchase options together under a specific product }, :type => RailsStory do Scenario

Re: [rspec-users] mocking the shell command (Kernel module)

2008-09-12 Thread Matt Wynne
On 12 Sep 2008, at 14:12, Joaquin Rivera Padron wrote: what is the best (or any) way of mocking the running of shell commands? e.g. code like the following: def method %{ ls } end spec: it "should list the directory contents" shell = mock(Object) # %{} lives in Kernel module and its su

Re: [rspec-users] mocking the shell command (Kernel module)

2008-09-12 Thread Joaquin Rivera Padron
ooop, sorry the last one goes out unfinished (some gmail hotkey)... hello there, what is the best (or any) way of mocking the running of shell commands? e.g. code like the following: def method %{ ls } end spec: it "should list the directory contents" shell = mock(Object) # %{} lives i

[rspec-users] mocking the shell command (Kernel module)

2008-09-12 Thread Joaquin Rivera Padron
hello there, what is the best (or any) way of mocking the running of shell commands? e.g. code like the following: %{ ls } spec: it "should list the directory contents" shell = mock(Object) # %{} lives in Kernel module and its sugar for ` end ___ r

Re: [rspec-users] cucumber gem install

2008-09-12 Thread aslak hellesoy
On Fri, Sep 12, 2008 at 1:52 PM, aidy lewis <[EMAIL PROTECTED]> wrote: > Hi, > > I am having problem with the cucumber gem install > > gem sources --add http://gems.github.com/ > gem install aslakhellesoy-cucumber > > => > > C:\>gem install aslakhellesoy-cucumber > ERROR: While executing gem ... (

[rspec-users] cucumber gem install

2008-09-12 Thread aidy lewis
Hi, I am having problem with the cucumber gem install gem sources --add http://gems.github.com/ gem install aslakhellesoy-cucumber => C:\>gem install aslakhellesoy-cucumber ERROR: While executing gem ... (Errno::ENOENT) No such file or directory - c:/ruby/lib/ruby/gems/1.8/gems/aslakhelles

[rspec-users] mocking named_scope utilization

2008-09-12 Thread Juanma Cervera
Hello, I am having trouble to mock the chaining of named_scope in the controller, also I would like to use will_paginate. def index @things = Thing.allowed_for(@current_user).available.paginate :page => params[:page] end ¿How to do it? Thanks Juanma Cervera -- Posted via http://www.ruby-forum