Re: [rspec-users] How to kill a running spec

2008-11-17 Thread Nick Hoffman
On 2008-11-16, at 17:46, Scott Taylor wrote: On Nov 16, 2008, at 2:40 PM, Nick Hoffman wrote: Hi guys. Occasionally, I'll want to kill a long spec process that's running. Usually I hit CTRL+c to kill a running process, but doing that for a running spec just causes "^C" to be printed to the

[rspec-users] More Examples

2008-11-17 Thread James B. Byrne
I have a feature spec that looks like this: Scenario: The entity common name should be normalized Given 1 valid entity And I am on the edit entity page When I fill in "Common Name" with " ANYThing WronG wITh tHiS? " And I press "Update" Then I should see an update succ

Re: [rspec-users] More Examples

2008-11-17 Thread Matt Wynne
On 17 Nov 2008, at 20:33, James B. Byrne wrote: I have a feature spec that looks like this: Scenario: The entity common name should be normalized Given 1 valid entity And I am on the edit entity page When I fill in "Common Name" with " ANYThing WronG wITh tHiS? " And I press

Re: [rspec-users] More Examples

2008-11-17 Thread James Byrne
Matt Wynne wrote: > On 17 Nov 2008, at 20:33, James B. Byrne wrote: >> >> More Examples: >>| initial | after| >>| "ALL CAPS"| "All Caps" | >>| " Squeeze leading space"| "Squeeze Leading Space" | >>|

Re: [rspec-users] features and form filling - going declarative?

2008-11-17 Thread Dan North
Bit of a ramble, but see inline comments. Cheers, Dan 2008/11/7 Joseph Wilk <[EMAIL PROTECTED]> > David Chelimsky wrote: > >> On Fri, Nov 7, 2008 at 9:58 AM, David Chelimsky <[EMAIL PROTECTED]> >> wrote: >> >> >>> On Fri, Nov 7, 2008 at 9:54 AM, Matt Wynne <[EMAIL PROTECTED]> wrote: >>> >>>

Re: [rspec-users] cucumber feature description

2008-11-17 Thread Dan North
2008/10/26 aslak hellesoy <[EMAIL PROTECTED]> > On Sun, Oct 26, 2008 at 3:56 PM, Stephen Eley <[EMAIL PROTECTED]> wrote: > > On Sat, Oct 25, 2008 at 7:19 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: > >> > >> A more qualified person may want to answer your question, but my short > >> explanation of th

[rspec-users] How to use config.gem for rspec and rspec-rails

2008-11-17 Thread Yi Wen
Hi, Is there anyway I can specify config.gem rspec :lib => "spec" config.gem rspec-rails :lib => "spec/rails" in my test.rb? Basically I got this after I specify rspec rake gems:unpack RAILS_ENV=test (in /home/ywen/projects/kod) rake aborted! uninitialized constant Spec::Rake /home/ywen/project

[rspec-users] Cucumber autotest load error between 0.1.8 and 0.1.9

2008-11-17 Thread Harry Love
Hi, I'm new to the list and to Cucumber (and RSpec and testing in general) so I apologize if this has already come up. I searched the archive and didn't see anything. Last week I installed Cucumber 0.1.8 for my Rails app and both 'cucumber features' and 'rake features' worked fine. Features and s

[rspec-users] Mocking and stubbing model relationships

2008-11-17 Thread Nick Hoffman
Before writing specs for a one-to-many relationship between two models, I did some research and found that some people were creating proxy mocks, and others were using Matthew Heidemann's #stub_association! (which essentially does that for, but in a nice, DRY way): http://www.ruby-forum.

Re: [rspec-users] More Examples

2008-11-17 Thread Pau Cor
James Byrne wrote: > This is what I see in the console: The underlining didn't come through in you post, so that doesn't help us. If you post your step matchers, then we can tell you what your columns need to be. Essentially, for every (.*) in your step matchers, you need a column. And they hav

Re: [rspec-users] testing an action which requires picture

2008-11-17 Thread Mano ah
Nick Hoffman wrote: > On 2008-11-14, at 06:29, Mano ah wrote: >> image = Image.new >> >> image.blob= params[:image][:blob] >> >> image.save_picture >> >>end >> -- > > Hi Mano. It doesn't really matter whether or not your "picture" model > interacts with a database. Simply use

Re: [rspec-users] testing an action which requires picture

2008-11-17 Thread Mano ah
Thank you All the above specification passed. Now I want to test the return value. I mean def scan #--- if request.post? image = Image.new image.blob= params[:image][:blob] if image.save_picture @code = returns a barcode image value e