Re: [rspec-users] [RSpec, Rails] POST create action spec and before_filter

2009-05-18 Thread Tero Tilus
2009-05-18 21:40, Florent Florent: > I have this controller: http://pastie.org/482270 > I wrote this spec: http://pastie.org/482273 There are a few spots which draw my attention. At spec line 4 you create a mock Page with #save that always fails (succesfull save returns true). Is that intentiona

Re: [rspec-users] Including extra directories for Autospec

2009-05-18 Thread Adam Anderson
Yeah. I apologize that was a typo on my part. It should have said ./.autotest -Adam On Mon, May 18, 2009 at 11:55 AM, Kero van Gelder wrote: >> Then I edit the files like so: >> >> ./autotest: >> Autotest.add_hook :initialize do |at| >>   at.add_mapping(%r%^spec/something/.*_spec\.rb$%) do >>  

Re: [rspec-users] Using "return" in rspec test

2009-05-18 Thread BJ Clark
On May 18, 2009, at 7:51 PM, Gary Lin wrote: Hi, I am still new to rspec and I wonder if anyone can give me some insight about the problem I have encountered. I notice whenever I use "return" in my test, it will skip all the examples and exit right out of my test run. Here is a small e

Re: [rspec-users] Using "return" in rspec test

2009-05-18 Thread Phlip
Gary Lin wrote: describe "This tests uses return in my code" do it "should print Hello" do puts "Hello" # skip some test scenario if product is in demo mode if @product.demoMode? return; use 'break' (However, generally speaking, tests should either pass or fail,

[rspec-users] Using "return" in rspec test

2009-05-18 Thread Gary Lin
Hi, I am still new to rspec and I wonder if anyone can give me some insight about the problem I have encountered. I notice whenever I use "return" in my test, it will skip all the examples and exit right out of my test run. Here is a small example that demonstrate the problem: describe "Th

[rspec-users] [RSpec, Rails] POST create action spec and before_filter

2009-05-18 Thread Florent Florent
Hello, I face the following problem for a POST create action spec. I have this controller: http://pastie.org/482270 I wrote this spec: http://pastie.org/482273 The spec "should set @context" works fine. But when running the spec "should build a new message" I got this error: expected :new wi

Re: [rspec-users] Cucumber + Authorize.net CIM

2009-05-18 Thread David Nawara
Aslak Hellesøy wrote: > Introduce an abstraction layer for that site with an API you define. > > Aslak Thanks Aslak. I'll give this method a shot. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://

Re: [rspec-users] Fixture::FormatError parsing YAML

2009-05-18 Thread WJSimacek
On May 18, 2:16 pm, David Chelimsky wrote: > On Mon, May 18, 2009 at 10:31 AM, WJSimacek wrote: > > Hi, > >    I'm trying to test restful_authentication plugin and am getting > > errors with my install. > >      ==>I've been through the YAML specification and actually copied > > the fixture fil

Re: [rspec-users] Fixture::FormatError parsing YAML

2009-05-18 Thread David Chelimsky
On Mon, May 18, 2009 at 10:31 AM, WJSimacek wrote: > Hi, >    I'm trying to test restful_authentication plugin and am getting > errors with my install. >      ==>I've been through the YAML specification and actually copied > the fixture file into word looking for tabs instead of spaces. I've > pla

Re: [rspec-users] Cucumber rake/webrat issue.

2009-05-18 Thread Matthew Van Horn
On May 18, 2009, at 2:49 PM, Matthew Van Horn wrote: I'm probably missing something really obvious, but I just upgraded cucumber, rspec/rails, and webrat on a project, and for some reason, cucumber is not seeing any of the webrat steps (or bmabey's email steps) when running from rake. It

Re: [rspec-users] Cucumber rake/webrat issue.

2009-05-18 Thread Ben Mabey
Matthew Van Horn wrote: I'm probably missing something really obvious, but I just upgraded cucumber, rspec/rails, and webrat on a project, and for some reason, cucumber is not seeing any of the webrat steps (or bmabey's email steps) when running from rake. It seems ok when running using the cu

Re: [rspec-users] Cucumber rake/webrat issue.

2009-05-18 Thread aslak hellesoy
Hi Matthew, Please repost to the new list: http://www.nabble.com/-Cucumber--ANN%3A-New-Google-Group-for-Cucumber-td23602831.html On Mon, May 18, 2009 at 8:49 PM, Matthew Van Horn wrote: > I'm probably missing something really obvious, but I just upgraded cucumber, > rspec/rails, and webrat on a

Re: [rspec-users] [Cucumber] ANN: New Google Group for Cucumber

2009-05-18 Thread Lee Hambley
Excellent news, thankyou Aslak, this was exactly what I was hoping for. 2009/5/18 aslak hellesoy > David Chelimsky and I have decided that it's now best to create a > separate mailing list for Cucumber. > The RSpec mailing lists remain the same, but we're hoping that you > will all move Cucumber

Re: [rspec-users] running 1 example

2009-05-18 Thread Mark Wilden
On Mon, May 18, 2009 at 6:46 AM, David Chelimsky wrote: > On Mon, May 18, 2009 at 7:04 AM, lawrence.pit > wrote: > > Hi, > > > > Suppose you have a file with dozens of examples within several > > describe/context blocks, and you wanted to focus on just one example. > > Is there an easy way to run

[rspec-users] Cucumber rake/webrat issue.

2009-05-18 Thread Matthew Van Horn
I'm probably missing something really obvious, but I just upgraded cucumber, rspec/rails, and webrat on a project, and for some reason, cucumber is not seeing any of the webrat steps (or bmabey's email steps) when running from rake. It seems ok when running using the cucumber binary. The

Re: [rspec-users] Including extra directories for Autospec

2009-05-18 Thread Kero van Gelder
> Then I edit the files like so: > > ./autotest: > Autotest.add_hook :initialize do |at| > at.add_mapping(%r%^spec/something/.*_spec\.rb$%) do > at.files_matching(%r%^spec/something/.*_spec\.rb$%) > end > end Do you perhaps have a ~/.autotest with a hook to :initialize ? If so, let it ret

Re: [rspec-users] Skipping the testscenario based on Given block execution.

2009-05-18 Thread Lee Hambley
Anil, Your precondition shouldn't fail? - Lee 2009/5/18 Anil Gollaa > > Hi, > Generally in cucumber, we write the preconditions in GIVEN block, > Is there any way in cucumber using which test scenario execution is > skipped, based on the Given block execution. > Because there is no point in ex

Re: [rspec-users] Recommendations on multi-view scenarios?

2009-05-18 Thread Matt Wynne
On 18 May 2009, at 16:02, Denis Haskin wrote: I'm trying to find out best practices for a multi-view scenario. Take the classic example of ecommerce, where you might first enter address information, then credit card information, then confirm it all and the purchase is made. Seems to me

Re: [rspec-users] Cucumber + Authorize.net CIM

2009-05-18 Thread aslak hellesoy
> Hi all, > > I'm curious how one would recommend testing authorize.net customer > information manager storage with cucumber stories. > > In my checkout process testing, my code sends user profile/card/address > information to the authorize.net test servers, which then stores the Introduce an abst

[rspec-users] [Cucumber] ANN: New Google Group for Cucumber

2009-05-18 Thread aslak hellesoy
David Chelimsky and I have decided that it's now best to create a separate mailing list for Cucumber. The RSpec mailing lists remain the same, but we're hoping that you will all move Cucumber related discussions to this new list. I have already sent an invitation to the 98 people who have provided

Re: [rspec-users] List Split

2009-05-18 Thread Mark Wilden
On Mon, May 18, 2009 at 9:51 AM, Lee Hambley wrote: > > To me too, maybe we could get some mileage by just having a convention of > tagging subjects properly [rspec-users][cucumber][java] etc.. and people > could filter out what they just don't care about > Been there, mandated that - it didn't

[rspec-users] Cucumber + Authorize.net CIM

2009-05-18 Thread David Nawara
Hi all, I'm curious how one would recommend testing authorize.net customer information manager storage with cucumber stories. In my checkout process testing, my code sends user profile/card/address information to the authorize.net test servers, which then stores the sensitive data for me. Obviou

Re: [rspec-users] List Split

2009-05-18 Thread Lee Hambley
Rick, To me too, maybe we could get some mileage by just having a convention of tagging subjects properly [rspec-users][cucumber][java] etc.. and people could filter out what they just don't care about Actually, looking at today's mail, its the Java thread that broke the proverbial camel's back an

Re: [rspec-users] List Split

2009-05-18 Thread Jonathan Linowes
makes no difference to me, if the list were to split, i'd subscribe to both so I'd see the same signal and noise. --linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] List Split

2009-05-18 Thread Rick DeNatale
On Mon, May 18, 2009 at 11:46 AM, Zach Dennis wrote: > On Mon, May 18, 2009 at 10:13 AM, Lee Hambley wrote: >> I'm honestly sure that nobody cares, but this list needs to split, I can't >> handle the volume of `junk` that is completely irrelevant because I am >> subscribed looking for to keep up

Re: [rspec-users] List Split

2009-05-18 Thread Lee Hambley
Zach, You hit the nail on the head exactly, the problem was compounded by my being on vacation for a week, and coming back to a flood of emails, regrettably my gmail filters can't even take the strain, I can't restrict it accurately enough, as there isn't enough standardization in subject tagging (

Re: [rspec-users] Insight needed into misbehaving expectations needed

2009-05-18 Thread David Chelimsky
On Mon, May 18, 2009 at 10:23 AM, Kenneth Kalmer wrote: > Hi everyone > > I have a peculiar scenario that I don't know how to debug, or get to the > bottom of, and need some insight. > > Environment: > > * Rails 2.3.2 > * rspec 1.2.6 & rspec-rails 1.2.6 (vendored gems) > * mocha 0.9.5 (vendored) >

[rspec-users] Insight needed into misbehaving expectations needed

2009-05-18 Thread Kenneth Kalmer
Hi everyone I have a peculiar scenario that I don't know how to debug, or get to the bottom of, and need some insight. Environment: * Rails 2.3.2 * rspec 1.2.6 & rspec-rails 1.2.6 (vendored gems) * mocha 0.9.5 (vendored) Scenario: * I have expectations setup in a before block, as well as in th

[rspec-users] Skipping the testscenario based on Given block execution.

2009-05-18 Thread Anil Gollaa
Hi, Generally in cucumber, we write the preconditions in GIVEN block, Is there any way in cucumber using which test scenario execution is skipped, based on the Given block execution. Because there is no point in executing the test scenario when precondition itself fails. Please help me in this re

Re: [rspec-users] cucumber-java

2009-05-18 Thread aslak hellesoy
> Run the examples using maven, or you have to set your classpath yourself.. > See README.textile in simple and spring. It has some command line snippets with classpath. I use this to omit Maven. > Trond. > > On Mon, May 18, 2009 at 5:10 PM, Raymond Barlow > wrote: >> >> With your help I am prog

Re: [rspec-users] List Split

2009-05-18 Thread Zach Dennis
On Mon, May 18, 2009 at 10:13 AM, Lee Hambley wrote: > I'm honestly sure that nobody cares, but this list needs to split, I can't > handle the volume of `junk` that is completely irrelevant because I am > subscribed looking for to keep up to date with cucumber wisdom; I'm going to > see how this m

[rspec-users] Fixture::FormatError parsing YAML

2009-05-18 Thread WJSimacek
Hi, I'm trying to test restful_authentication plugin and am getting errors with my install. ==>I've been through the YAML specification and actually copied the fixture file into word looking for tabs instead of spaces. I've played with various parts of the formatting, but I need a fresh p

Re: [rspec-users] cucumber-java

2009-05-18 Thread Trond Marius Øvstetun
Run the examples using maven, or you have to set your classpath yourself.. Trond. On Mon, May 18, 2009 at 5:10 PM, Raymond Barlow wrote: > With your help I am progressing :) > > I've managed to install the cucmber-java gem. But now, if I > > jruby -S cucumber features > > from any directory, I g

[rspec-users] Recommendations on multi-view scenarios?

2009-05-18 Thread Denis Haskin
I'm trying to find out best practices for a multi-view scenario. Take the classic example of ecommerce, where you might first enter address information, then credit card information, then confirm it all and the purchase is made. Seems to me this has to be done with a separate scenario for eac

Re: [rspec-users] cucumber-java

2009-05-18 Thread Raymond Barlow
With your help I am progressing :) I've managed to install the cucmber-java gem. But now, if I jruby -S cucumber features from any directory, I get this error: cannot link Java class cucumber.internal.PicoContainerStepMother, probable missing dependency: org/picocontainer/MutablePicoContainer (

[rspec-users] [cucumber] fat client continued(?)

2009-05-18 Thread Jeroen van Dijk
Hi All, I'm looking for a cucumber (browser) client where the product owner can browse/edit features and see the status of the features. So far I tried the rcumber plugin (found here http://wiki.github.com/aslakhellesoy/cucumber/related-tools) which more or less does what I want but still in a ve

[rspec-users] List Split

2009-05-18 Thread Lee Hambley
I'm honestly sure that nobody cares, but this list needs to split, I can't handle the volume of `junk` that is completely irrelevant because I am subscribed looking for to keep up to date with cucumber wisdom; I'm going to see how this message is received, and unsubscribe myself later today. The SN

Re: [rspec-users] Cucumber broke my rake tasks! 0.3.5

2009-05-18 Thread Andrew Premdas
Sorry for being a bit slow, but what would you like me to set it to?? 2009/5/18 aslak hellesoy : >> 2009/5/15 aslak hellesoy : Andrew Premdas wrote: > > Seem to be having a problem with the new releases 0.3.5 which > completely breaks my rake tasks http://gist.github.com/112149. >

Re: [rspec-users] New setup error. no such file to load -- spec/story

2009-05-18 Thread David Chelimsky
On Mon, May 18, 2009 at 8:59 AM, Matt Wynne wrote: > > On 18 May 2009, at 03:44, Jason Calleiro wrote: > >> gems: >> rspec (1.2.6) >> rspec-rails (1.2.6) >> cucumber (0.3.4, 0.3.2) >> webrat (0.4.4) >> >> Just got my new machine (I'm learning rails, im a front end designer). >> pulled a repo that

Re: [rspec-users] New setup error. no such file to load -- spec/story

2009-05-18 Thread Matt Wynne
On 18 May 2009, at 03:44, Jason Calleiro wrote: gems: rspec (1.2.6) rspec-rails (1.2.6) cucumber (0.3.4, 0.3.2) webrat (0.4.4) Just got my new machine (I'm learning rails, im a front end designer). pulled a repo that we've been working on to run rake and get started and im getting this erro

Re: [rspec-users] running 1 example

2009-05-18 Thread David Chelimsky
On Mon, May 18, 2009 at 7:04 AM, lawrence.pit wrote: > Hi, > > Suppose you have a file with dozens of examples within several > describe/context blocks, and you wanted to focus on just one example. > Is there an easy way to run just that one example instead of all the > examples in the file? $ sp

[rspec-users] running 1 example

2009-05-18 Thread lawrence.pit
Hi, Suppose you have a file with dozens of examples within several describe/context blocks, and you wanted to focus on just one example. Is there an easy way to run just that one example instead of all the examples in the file? Cheers, Lawrence ___ rs

[rspec-users] [Cucumber] JUnit, Spring and autowiring

2009-05-18 Thread mikaelvik
We are having trouble with JUnit-tests that are doing dependency injection in the setup of database connections. The stacktrace identifies autowiring of sessionFactory as the problem. During bean creation of sessionFactory we get a NoSuchMethodError; probably because of trouble when initializing t

Re: [rspec-users] Cucumber broke my rake tasks! 0.3.5

2009-05-18 Thread aslak hellesoy
> 2009/5/15 aslak hellesoy : >>> Andrew Premdas wrote: Seem to be having a problem with the new releases 0.3.5 which completely breaks my rake tasks http://gist.github.com/112149. WIth the  t.fork = true # Explicitly fork for cucumber 0.3.4 and rails lin

Re: [rspec-users] REG: Colour setting for html logs

2009-05-18 Thread aslak hellesoy
> Anil Gollaa wrote: >> >> Hi, >> When i run some testcases using cucumber sample.feature --format >> html>features.html. >> >> 1) After execution, By default in the html file, background colour is >> black. >> How can i set the background color any other colour i want. Like we can >> set >> other

Re: [rspec-users] REG: Colour setting for html logs

2009-05-18 Thread Joseph Wilk
Anil Gollaa wrote: Hi, When i run some testcases using cucumber sample.feature --format html>features.html. 1) After execution, By default in the html file, background colour is black. How can i set the background color any other colour i want. Like we can set other passed, failed colours using

Re: [rspec-users] cucumber-java

2009-05-18 Thread Trond Marius Øvstetun
I believe (someone correct me if I'm wrong..) that the version of cucumber_java you have installed is an older version from a central repository. cucumber/pico_container is the result of a recent refactoring (as is cucumber/spring). For me it helped to use cp instead of mv in the Rakefile at some p

[rspec-users] REG: Colour setting for html logs

2009-05-18 Thread Anil Gollaa
Hi, When i run some testcases using cucumber sample.feature --format html>features.html. 1) After execution, By default in the html file, background colour is black. How can i set the background color any other colour i want. Like we can set other passed, failed colours using the below command. e

Re: [rspec-users] cucumber-java

2009-05-18 Thread Raymond Barlow
Hi Trond, Thanks for your help! For a start, I'm running OSX (not windoze). OK, it seems that I have successfully installed the cucmber-java gemI think. I couldn't get the jruby -S rake gem step to work from the cucumber-java directory. If I did this, all I get is * README.txt is missing

Re: [rspec-users] cucumber-java

2009-05-18 Thread Raymond Barlow
I agree. I'm still not able to get cucumber-java working. If I am successful, I would be happy to upload a 'from woah to go' set of instructions. /Raymond 2009/5/18 aslak hellesoy > > > > > > On Mon, May 18, 2009 at 10:02 AM, aslak hellesoy < > aslak.helle...@gmail.com> > > wrote: > >> > >> On

Re: [rspec-users] cucumber-java

2009-05-18 Thread aslak hellesoy
> > > On Mon, May 18, 2009 at 10:02 AM, aslak hellesoy > wrote: >> >> On Sun, May 17, 2009 at 12:01 AM, Raymond Barlow >> wrote: >> > OK, that seemed to help a bit. That installed a bunch of stuff, and then >> > I >> > did the mvn clean package in the examples directory--which built the >> > exam

Re: [rspec-users] cucumber-java

2009-05-18 Thread Trond Marius Øvstetun
On Mon, May 18, 2009 at 10:02 AM, aslak hellesoy wrote: > On Sun, May 17, 2009 at 12:01 AM, Raymond Barlow > wrote: > > OK, that seemed to help a bit. That installed a bunch of stuff, and then > I > > did the mvn clean package in the examples directory--which built the > example > > jar. > > > >

Re: [rspec-users] cucumber-java

2009-05-18 Thread aslak hellesoy
On Sun, May 17, 2009 at 12:01 AM, Raymond Barlow wrote: > OK, that seemed to help a bit. That installed a bunch of stuff, and then I > did the mvn clean package in the examples directory--which built the example > jar. > > So I guess my next step would be to > cucumber features > in the featuers d

Re: [rspec-users] cucumber-java

2009-05-18 Thread Trond Marius Øvstetun
On Sun, May 17, 2009 at 12:01 AM, Raymond Barlow wrote: > OK, that seemed to help a bit. That installed a bunch of stuff, and then I > did the mvn clean package in the examples directory--which built the example > jar. > > So I guess my next step would be to > cucumber features > in the featuers d