Re: [rspec-users] Missing method implementation_backtrace

2008-11-24 Thread David Chelimsky
On Fri, Nov 21, 2008 at 7:28 AM, aslak hellesoy [EMAIL PROTECTED] wrote: On Fri, Nov 21, 2008 at 4:20 AM, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Nov 20, 2008 at 5:47 PM, rubyphunk [EMAIL PROTECTED] wrote: Hi, same problem here. I always used example.implementation_backtrace

Re: [rspec-users] How to write advanced matchers

2008-11-24 Thread Pat Maddox
Erik Pukinskis [EMAIL PROTECTED] writes: * a matcher that accepts a block and passes on some information, like has_tag? * a matcher that can go in that block and use that information, like with_tag? * a mock argument matcher like is_instance_of or hash_including? It'd be wonderful if someone

[rspec-users] cucumber question - uninitialized constant creating object in model

2008-11-24 Thread Tim Walker
Sorry if this is a really basic question. Scanned the past several months archives, didn't see it. When I am running cucumber features I get the error: uninitialized constant Thing (NameError) With step code being executed as... Given /^a thing consisting of L1 $/ do Thing.new end I

Re: [rspec-users] Missing method implementation_backtrace

2008-11-24 Thread Andreas Wolff
On Fri, Nov 21, 2008 at 2:28 PM, aslak hellesoy [EMAIL PROTECTED] wrote: How will people know that a method is part of an API? Can we simply say that if it has RDoc it's part of the API and stable, and if it doesn't it's not? (We can still RDoc non-API code, just put :nodoc: on it so it

Re: [rspec-users] Cucumber: Group Given, Whens and Thens

2008-11-24 Thread Peter Jaros
On Fri, Nov 21, 2008 at 4:35 AM, Andrew Premdas [EMAIL PROTECTED] wrote: Interesting ... so this establishes a convention to use in features that all Givens are written in the past tense and all whens in the present tense. Actually, I put both in the present tense, but Givens describe states

Re: [rspec-users] restful_authentication's permission_denied and rspec

2008-11-24 Thread David Chelimsky
On Fri, Nov 21, 2008 at 8:20 AM, Ramon Tayag [EMAIL PROTECTED] wrote: Hi everyone, WIth restful_authentication you get a method permission_denied that you just slap onto the controller when you don't want a user to gain access to something. In this method Rails does a bunch of stuff then

Re: [rspec-users] cucumber question - uninitialized constant creating object in model

2008-11-24 Thread Joseph Wilk
Tim Walker wrote: Sorry if this is a really basic question. Scanned the past several months archives, didn't see it. When I am running cucumber features I get the error: uninitialized constant Thing (NameError) With step code being executed as... Given /^a thing consisting of L1 $/ do

Re: [rspec-users] cucumber question - uninitialized constant creating object in model

2008-11-24 Thread aslak hellesoy
On Sun, Nov 23, 2008 at 6:50 PM, Tim Walker [EMAIL PROTECTED] wrote: Sorry if this is a really basic question. Scanned the past several months archives, didn't see it. When I am running cucumber features I get the error: uninitialized constant Thing (NameError) With step code being

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread James Byrne
James Byrne wrote: into this. Now, so far I have considered three possibilities: Ok, five... -- 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] Cucumber: Group Given, Whens and Thens

2008-11-24 Thread Nicolás Sanguinetti
On Thu, Nov 20, 2008 at 8:05 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Nov 20, 2008 at 10:40 AM, Andrew Premdas [EMAIL PROTECTED] wrote: Also occasionally you may want to use a when as a given. Cucumber doesn't actually use the given|when|then|and to differentiate steps, just the

[rspec-users] [Cucumber] single feature run produces duplicate features in HTMl report

2008-11-24 Thread aidy lewis
Hi, I am running a number of features once, but for some reason, I am getting duplicate features in the HTML report. Has anyone else experienced this? Cucumber --version 0.1.8 Aidy ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] Test::Unit Functional failure puzzle

2008-11-24 Thread James Byrne
Matt Wynne wrote: Make sense? Matt Yes. I am afraid that my original post is based upon a naive sense of how things work in this environment. Clearly, whenever one is dealing with human input then the possibility of incomplete, contradictory, or simply wrong data must be accommodated as

Re: [rspec-users] Just trying out cucumber

2008-11-24 Thread Pau Cor
Shane Mingins wrote: Hi Just giving cucumber a trial with a Rails application and was wanting some feedback on what I did for my project token that is a system generated value Scenario: Register new project Given I am logged in And I am on the new project page

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Raimond Garcia
Hi guys, I'm having trouble figuring out where the line between writing a spec or a feature is. Since I started with rspec stories, I have the idea that stories where just the evolution of specs. My main reason for this was the re-usability of steps throughout stories, which I think is great.

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread aslak hellesoy
On Mon, Nov 24, 2008 at 8:40 PM, James Byrne [EMAIL PROTECTED] wrote: Where and how do you put custom logger statements in cucumber? I understood (more or less) how to do this in rspec in the spec_helper file but I do not know where to start with cucumber. Are you using any particular

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
aslak hellesoy wrote: On Mon, Nov 24, 2008 at 8:40 PM, James Byrne [EMAIL PROTECTED] wrote: Where and how do you put custom logger statements in cucumber? I understood (more or less) how to do this in rspec in the spec_helper file but I do not know where to start with cucumber. Are

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread aslak hellesoy
On Mon, Nov 24, 2008 at 9:00 PM, James Byrne [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Mon, Nov 24, 2008 at 8:40 PM, James Byrne [EMAIL PROTECTED] wrote: Where and how do you put custom logger statements in cucumber? I understood (more or less) how to do this in rspec in the

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Scott Taylor
On Nov 24, 2008, at 2:03 PM, Steven Rogers wrote: I'm working on a Rails project with someone else, and getting different results on specs. After a lot of poking around for differences, the only thing I can find is autospec in /opt/local/bin/ autospec vs. /usr/bin/autospec Seems like a

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Steven Rogers
On Nov 24, 2008, at 2:05 PM, Scott Taylor wrote: On Nov 24, 2008, at 2:03 PM, Steven Rogers wrote: I'm working on a Rails project with someone else, and getting different results on specs. After a lot of poking around for differences, the only thing I can find is autospec in /opt/local/

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Luis Lavena
On Mon, Nov 24, 2008 at 6:18 PM, Steven Rogers [EMAIL PROTECTED] wrote: On Nov 24, 2008, at 2:05 PM, Scott Taylor wrote: On Nov 24, 2008, at 2:03 PM, Steven Rogers wrote: I'm working on a Rails project with someone else, and getting different results on specs. After a lot of poking around

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
aslak hellesoy wrote: On Mon, Nov 24, 2008 at 9:00 PM, James Byrne [EMAIL PROTECTED] wrote: or other? Rails 2.2.2 It depends what you want to log and when. Have you tried to put it in a Before or After block? I'm not sure exactly what you're trying to achieve. Aslak I am

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
James Byrne wrote: logger.info(Running Scenario: #{scenario} ... logger.info( Running Step: #{step} ... should be: logger.info(Running Scenario: #{scenario}) and logger.info(Running Step: #{step}) -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread Joseph Wilk
I gather that before / after block only work within step files? If so then that requires each step file be modified to turn custom logging on or off, which is something I would much rather avoid. I don't think this is the case. Every Before/After that is in a required file is run before a

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Steven Rogers
On Nov 24, 2008, at 2:21 PM, Luis Lavena wrote: On Mon, Nov 24, 2008 at 6:18 PM, Steven Rogers [EMAIL PROTECTED] wrote: On Nov 24, 2008, at 2:05 PM, Scott Taylor wrote: On Nov 24, 2008, at 2:03 PM, Steven Rogers wrote: I'm working on a Rails project with someone else, and getting

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Luis Lavena
On Mon, Nov 24, 2008 at 7:23 PM, Steven Rogers [EMAIL PROTECTED] wrote: ... Yes - they both have the loadby order because they're running in unmodified git clones of the same project - so whatever the differences are, they're in the machine environment, not in flags and files within the Rails

Re: [rspec-users] Cucumber Custom Logging

2008-11-24 Thread James Byrne
Joseph Wilk wrote: I don't think this is the case. Every Before/After that is in a required file is run before a scenario. So in theory you could create one Before (in for example env.rb) which would get called for all scenarios. I experimented with the following code in env.rb,

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Shane Mingins
On 25/11/2008, at 7:29 AM, Pat Maddox wrote: Lately I've been putting more and more stuff into ATs. I'm finding it valuable to keep tests for domain logic separate from plain ol unit tests...meaning that my Account object may be tested mostly with Cucumber, but helper objects such as a stats

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Steven Rogers
On Nov 24, 2008, at 3:26 PM, Luis Lavena wrote: Is weird that you have autospec installed in two different places, unless there was some forced GEM_PATH and GEM_HOME for it. Yes, exactly - that's why I'm trying to figure out where among all this code and gems and install procedures that

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Pat Maddox
Shane Mingins [EMAIL PROTECTED] writes: On 25/11/2008, at 7:29 AM, Pat Maddox wrote: Lately I've been putting more and more stuff into ATs. I'm finding it valuable to keep tests for domain logic separate from plain ol unit tests...meaning that my Account object may be tested mostly with

Re: [rspec-users] Where does autospec come from?

2008-11-24 Thread Steven Rogers
On Nov 24, 2008, at 4:44 PM, Pat Maddox wrote: Steven Rogers [EMAIL PROTECTED] writes: I don't really expect anyone else to slog through that - I would really just like the one little tidbit where does autospec come from? autospec is installed as part of the rspec gem. Cool - thanks SR

Re: [rspec-users] How to write advanced matchers

2008-11-24 Thread Erik Pukinskis
Hey Pat, Thanks for your response! Even if it's just to say RTFC. :) I have been digging into the source regularly. It's a bit too complicated for me to understand right now, and I find often the way core matchers are written is appropriate for code that is going to be distributed with RSpec,

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Pau Cor
Pat Maddox wrote: Here's my latest Theory of Testing, in a nutshell: I really understand what you are getting at. However, as I less experienced developer (my degree is actually in business) I have found that having more unit tests (for models and controllers) helps ensure that I write better

Re: [rspec-users] Just trying out cucumber

2008-11-24 Thread Pau Cor
Shane Mingins wrote: I'm not an expert at regexpr the output on screen is: I'm no regex expert, but it is such a useful skill I'm always trying to improve. This might do it for you: /\p\\s*\b\Token\:\\/b\\s*[a-f0-9]{40}\s*\\/p\/m Cheers, Paul -- Posted via http://www.ruby-forum.com/.

Re: [rspec-users] Just trying out cucumber

2008-11-24 Thread Pau Cor
Pau Cor wrote: /\p\\s*\b\Token\:\\/b\\s*[a-f0-9]{40}\s*\\/p\/m On second thought, you might want to make that regex more generic. When you refactor your view code (i.e. insert divs, add ids/classes, and get rid of the b tags--which are evil) then your test won't break. The customer cares that

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Pat Maddox
Pau Cor [EMAIL PROTECTED] writes: Pat Maddox wrote: Here's my latest Theory of Testing, in a nutshell: I really understand what you are getting at. However, as I less experienced developer (my degree is actually in business) I have found that having more unit tests (for models and

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Andrew Premdas
I came across this idea of dropping unit tests for acceptance tests in the java world. It didn't like it there and I don't like it here, but maybe thats because I'm an old fuddy duddy or something :). I do think that every public method of an object should be specifically unit tested, and yes that

Re: [rspec-users] Just trying out cucumber

2008-11-24 Thread Mark Wilden
On Mon, Nov 24, 2008 at 7:39 PM, Peter Jaros [EMAIL PROTECTED]wrote: On Mon, Nov 24, 2008 at 10:35 PM, Mark Wilden [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 6:56 PM, Pau Cor [EMAIL PROTECTED] wrote: Pau Cor wrote: /\p\\s*\b\Token\:\\/b\\s*[a-f0-9]{40}\s*\\/p\/m I wouldn't use

Re: [rspec-users] [Cucumber] single feature run produces duplicate features in HTMl report

2008-11-24 Thread aidy lewis
Ben, Joseph, 2008/11/24 Joseph Wilk [EMAIL PROTECTED]: aidy lewis wrote: Hi, I am running a number of features once, but for some reason, I am getting duplicate features in the HTML report. Has anyone else experienced this? Cucumber --version 0.1.8 Aidy

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread David Chelimsky
On Mon, Nov 24, 2008 at 1:18 PM, Mark Wilden [EMAIL PROTECTED] wrote: On Mon, Nov 24, 2008 at 10:29 AM, Pat Maddox [EMAIL PROTECTED] wrote: I disagree with the part about edge cases. Acceptance Tests are about defining and verifying business value, and edge cases are supremely valuable to

Re: [rspec-users] Spec'ing via features

2008-11-24 Thread Ben Mabey
Andrew Premdas wrote: I came across this idea of dropping unit tests for acceptance tests in the java world. It didn't like it there and I don't like it here, but maybe thats because I'm an old fuddy duddy or something :). I do think that every public method of an object should be specifically

Re: [rspec-users] [Cucumber] single feature run produces duplicate features in HTMl report

2008-11-24 Thread aslak hellesoy
On Mon, Nov 24, 2008 at 7:01 PM, aidy lewis [EMAIL PROTECTED]wrote: Ben, Joseph, 2008/11/24 Joseph Wilk [EMAIL PROTECTED]: aidy lewis wrote: Hi, I am running a number of features once, but for some reason, I am getting duplicate features in the HTML report. Has anyone else