[rspec-users] DatabaseCleaner and EmailSpec are looking for new maintainers

2013-09-11 Thread Ben Mabey
Hi all, I'm looking for new maintainers for my DatabaseCleaner and EmailSpec gems. If you use them and would like to contribute to the community by taking over one or both of them please let me know. DatabaseCleaner in particular could use more attention and has a lot of room for improvement.

Re: [rspec-users] Why use DatabaseCleaner with rSpec?

2011-02-08 Thread Ben Mabey
On 2/8/11 10:49 AM, Marcelo de Moraes Serpa wrote: Hi list, I've used DatabaseCleaner in the past, but only when using Cucumber and Selenium (or Steak + Celerity) since turning on transactional_fixtures would prevent the data being accessible from app-server that is also triggered for the tests.

Re: [rspec-users] Comparing files

2010-12-11 Thread Ben Mabey
On 12/11/10 2:03 AM, Matt Wynne wrote: On 10 Dec 2010, at 16:21, Ben Mabey wrote: On 12/10/10 8:56 AM, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to asser

Re: [rspec-users] Comparing files

2010-12-10 Thread Ben Mabey
On 12/10/10 8:56 AM, Matt Wynne wrote: Hello folks, I'm writing some tests for file upload code. The files are binary, images mostly. I'm futzing around a bit, trying to figure out how to assert that the uploaded file is the same as some golden master. If I do this: File.read(uploaded_file_pa

Re: [rspec-users] Where do a set the description on a should satisfy.

2010-09-27 Thread Ben Mabey
On 9/27/10 8:23 AM, GregD wrote: On Sep 27, 9:14 am, David Chelimsky wrote: On Sep 27, 2010, at 8:12 AM, David Chelimsky wrote: re: how to include them: yes, in a module: # in spec/support/custom_matchers.rb module CustomMatchers ... end # in spec/spec_helper.rb RSpec.configure do

Re: [rspec-users] How do I test my Module?

2010-09-21 Thread Ben Mabey
On 9/21/10 6:51 AM, Gene Angelo wrote: I think I understand basic Class testing, however, how do I test a Module's behavior especially (in my case) where the Module will be used as an extension primarily e.g. object.extend MyModule. One option is to extend an object in your spec like so: descr

Re: [rspec-users] Re-using Rspec Matchers

2010-09-08 Thread Ben Mabey
On 9/8/10 11:42 AM, Brian Kaney wrote: Hey Everyone, Is it good practice to call matchers from within matchers? Kinda like this pattern: See: http://gist.github.com/570467 No, that should be avoided. The problem is that the "internal" matcher will throw an exception that will bubble u

Re: [rspec-users] How do I setup Rspec, Cucumber to test a Gem?

2010-07-20 Thread Ben Mabey
Walther Diechmann wrote: Hi, my question unwields me as a complete noob - which is okay - but I apologize for this totally basic question <:) I've bought the PragProg Rspec Book and googled, been reading blogs and what-have-I-not, but nowhere have I been able to find information detailing how I

Re: [rspec-users] Mocking and specing command line (cli) execution, file operations etc. ?

2010-06-07 Thread Ben Mabey
Kristian Mandrup wrote: What are the options for creating specs for file operations, executing commands in the CLI etc.? If I build a generator or something which runs a lot of things in the command line, how do I check the results of these operations, fx mocking file system updates and/or mocki

Re: [rspec-users] Running code on error

2010-04-30 Thread Ben Mabey
Ryan S wrote: Well, I am using SauceOnDemand with rspec. So when a test fails I want to download the video that corresponds to the failing test. I figured I could do a: it "should download video" do begin #some failing test here rescue Exception => e #download video raise e end

Re: [rspec-users] Spork

2010-03-31 Thread Ben Mabey
Ashley Moran wrote: On Mar 29, 2010, at 9:04 pm, David Chelimsky wrote: How wide-reaching are your changes? i.e. how many files, etc? I think it's only really the Runner stuff that's changed. I've split it into InProcess and DRbProxy or some such... although I think really the DRb s

Re: [rspec-users] How to test an app with multiple databases?

2010-03-08 Thread Ben Mabey
David Chelimsky wrote: On Sun, Mar 7, 2010 at 10:11 AM, Russell Fine wrote: David Chelimsky wrote: On Sun, Mar 7, 2010 at 9:45 AM, Russell Fine wrote: Our app connects to two databases. �The main database (through ActiveRecord::Base) is automatically cleared before each test.

Re: [rspec-users] testing named_scope

2010-01-23 Thread Ben Mabey
David Chelimsky wrote: On Mon, Jan 18, 2010 at 4:01 AM, Pat Maddox wrote: On Jan 17, 2010, at 6:17 PM, Nin wrote: Hi! I'm new to rspec and was wondering how named_scopes are usually tested? Is it enough to test that it's defined? or do you need to test the behavior as well? I've been r

[rspec-users] running specs on JRuby w/nailgun

2010-01-21 Thread Ben Mabey
Hi all, I know this is probably more of a JRuby question but I'm guessing that people on this list may have gone down this path before. At work we are starting a new project using JRuby. The startup speed for testing an app is very painful. Nailgun helps a lot with that. It only helps with

[rspec-users] Fwd: [ANN] Announcing MountainWest RubyConf 2010

2009-12-07 Thread Ben Mabey
FYI, MWRC 2010 is accepting presentation proposals now (see link below). I've been to this conference every year and it has been great each time. If you have anything you would like to present please send in a proposal. :) -Ben Begin forwarded message: From: Mike Moore Date: December 7

Re: [rspec-users] Spec helper configuration problem

2009-11-27 Thread Ben Mabey
Andrew Premdas wrote: Hi all, I have a rails application whose specs run on about eight different boxes, but I can't get them to work on my integration server. The bit thats breaking concerns some modules that I have in spec/support/modules which are loaded by the following line in spec_help

Re: [rspec-users] spec_helper getting reloaded after specs run under Textmate/Spork

2009-11-23 Thread Ben Mabey
David Chelimsky wrote: On Sat, Nov 21, 2009 at 12:28 AM, Elliot Winkler mailto:elliot.wink...@gmail.com>> wrote: I'm having the hardest time trying to figure out something weird I've suddenly run into. So I'm using Spork to run my specs. Naturally I've got TM_RSPEC_OPTS in Textma

Re: [rspec-users] testing Rake tasks with FakeFS

2009-11-01 Thread Ben Mabey
Jake Benilov wrote: Hello Ben, Hi Jake, I hope you don't mind but I am copying this response to the rspec-users list in case any one else is able to shed more light on it. I have a bit of a newbie question regarding fakefs; I want to test Rake tasks using fakefs and rspec: ~~

Re: [rspec-users] [BDD] View specs and cucumber -- duplication of effort?

2009-10-28 Thread Ben Mabey
nruth wrote: Hi Guys I'm going to put the cat amongst the pigeons here in the hope of some clarity falling out of the sky on me. My question is this: In a world with Cucumber what is the value of view specs? In the community (railscamp, for example) there are a fair number of people using Cucum

Re: [rspec-users] Can't figure you why I am getting deliver_from == Nil Using EmailSpec

2009-10-22 Thread Ben Mabey
Tom Hoen wrote: Using EmailSpec, I am testing the format of emails sent from an observer. I can verify the deliver_to address, the bcc_to address, and that the message body has the appropriate text. How are you verifying this? However, when I test the deliver_from, I am getting an

Re: [rspec-users] Mailing list for BDD?

2009-09-27 Thread Ben Mabey
Ed Howland wrote: Sorry for the cross post, but does anyone know of a list dedicated to just BDD? Seems like all the discussion is happening over on rspec-users, some on the tdd list. My interest is in the abstract concept of behavior driven design/development, as expressed by Dave Astels and Da

Re: [rspec-users] Problems while loading 'spec/stubs/cucumber'

2009-09-15 Thread Ben Mabey
Rodrigo Flores wrote: Hi I'm reading the rspec book and I'm having problems when I require the file 'spec/stubs/cucumber'. When I go to an IRB prompt and type require 'spec/stubs/cucumber' after requiring another libraries [1] I get the false in 'spec/expectations' and an error in 'spec/stub

Re: [rspec-users] running rake spec:remote

2009-08-25 Thread Ben Mabey
oren wrote: When running autotest only 'rake spec' is running and I want it to run 'rake spec:remote' as well. How do i achieve that? IIRC, autospec (not autotest) does not use rake at all. It uses the opts defined in spec/spec.opts. I would suggest making any needed changes in that fi

Re: [rspec-users] arbitrary handling of received messages in mocks

2009-08-25 Thread Ben Mabey
Chuck Remes wrote: I am trying to process a message sent to a mock to verify it contains the correct keys. In my case I am sending a JSON string to the mock built from data passed in via the test. The object internally builds a hash and then constructs the JSON string from it. I can't get my

Re: [rspec-users] undefined method 'mock'

2009-08-23 Thread Ben Mabey
Jesterman81 wrote: Greetings, I am trying to use the mock method in rspec and it returns a undefined method 'mock' error. I am using this with the rspec book in chapter 6.3. Do I have to configure rspec someone. I have gem rspec 1.2.8 installed and using ruby 1.8. any help will be appreciate

Re: [rspec-users] [Cucumber] testing emails with celerity - the best solution

2009-08-23 Thread Ben Mabey
Matt Wynne wrote: On 22 Aug 2009, at 13:09, Sławosz Sławiński wrote: Hi, I'm trying to test emails with Celerity. The problem is, because Celerity browser uses environment 'cucumber', but Cucubmer runs in 'test'. Emails steps are running in 'test', so it is impossible to check mails send in 'c

Re: [rspec-users] Sharing code and still keeping a "only commit if all is green" discipline

2009-08-20 Thread Ben Mabey
David Chelimsky wrote: On Thu, Aug 20, 2009 at 7:00 PM, Marcelo de Moraes Serpa wrote: Hello list, I'm working in a big project in the company I'm working on as a "BDD tech lead", this means I'm leading the implementation of BDD in ongoing projects, most of them did not use BDD from the star

Re: [rspec-users] specify a port for DRB

2009-08-12 Thread Ben Mabey
Chris Flipse wrote: Pardon the crosspost, but this applies to both So, at work, I'm one of several people developing on the same multi-user unix system. I/we would like to be able to use the drb server, but at the moment rspec,cucumber and spork assume a single well known port number for drb

Re: [rspec-users] [cucumber] table.hashes

2009-07-28 Thread Ben Mabey
Yi Wen wrote: Hi, I had a couple features failed with cucumber 0.3.90 because table.hashes is frozen so I cannot change the hashes anymore. Just wonder what's the reason behind the change? Thanks Yi ___ rspec-users mailing list rspec-users@ruby

Re: [rspec-users] On Mocks vs Stubs in the context of rSpec

2009-07-24 Thread Ben Mabey
Rick DeNatale wrote: On Thu, Jul 23, 2009 at 8:41 PM, Ben Mabey wrote: You can, IMO, use a "mock" like a stub and a "stub" like a mock.. Take this for example: describe "#some_method" do it "delegates to some_obejct" do some_object = stub('som

Re: [rspec-users] How detailed should error scenarios be?

2009-07-24 Thread Ben Mabey
Ben Mabey wrote: Nathan Benes wrote: I'm fairly new to cucumber and rspec but so far am falling in love with both. I've read up on several different articles concerning these testing tools including the 'beta' BDD rspec/cucumber book. I saw this thread here: http://www.

Re: [rspec-users] On Mocks vs Stubs in the context of rSpec

2009-07-24 Thread Ben Mabey
Marcelo de Moraes Serpa wrote: Thanks David and Ben for the comprehensive replies! I really appreciate it :) These wikipedia articles helped me to understand on the more conceptual level: http://en.wikipedia.org/wiki/Method_stub http://en.wikipedia.org/wiki/Mock_object So, if I understand it r

Re: [rspec-users] How detailed should error scenarios be?

2009-07-24 Thread Ben Mabey
Nathan Benes wrote: I'm fairly new to cucumber and rspec but so far am falling in love with both. I've read up on several different articles concerning these testing tools including the 'beta' BDD rspec/cucumber book. I saw this thread here: http://www.ruby-forum.com/topic/183428 Which concer

Re: [rspec-users] On Mocks vs Stubs in the context of rSpec

2009-07-23 Thread Ben Mabey
Marcelo de Moraes Serpa wrote: Hello list, >From what I could see, the lines between mocks and stubs are subtle, but the general idea I got is that mocks set expectations and stubs are only dummy objects/method calls. What confused me though, is that the stub() method is an alias for mock() in S

Re: [rspec-users] My very fist spec file (not sure what's wrong..)

2009-07-21 Thread Ben Mabey
internetchris wrote: I have one additional question after thinking about this for a while. Forgive me if I'm about to read this in the book, It came to mind so I thought I would ask. When writing specs for controllers am I always going to mock the model? Are controllers always isolated from the a

Re: [rspec-users] My very fist spec file (not sure what's wrong..)

2009-07-20 Thread Ben Mabey
Chris Sund wrote: Hey Everyone, I am finally to the point in the rspec book where it describes how to implement controller specs, so I thought what the heck, I'll give it a try. I have an app I have been working on (Inside out) that I needed to get test specs written for before I continue on wit

Re: [rspec-users] [ANN] rspec 1.2.8 Released

2009-07-16 Thread Ben Mabey
David Chelimsky wrote: rspec version 1.2.8 has been released! * * * * * Behaviour Driven Development for Ruby. Changes: ### Version 1.2.8 / 2008-07-16 * enhancements * better messages for

Re: [rspec-users] ZenTest, RSpec and Ruby 1.9.1

2009-07-11 Thread Ben Mabey
Robert Rouse wrote: Hello, I thought maybe you guys could help. I'm trying to use RSpec along with ZenTest. However, all I seem to get back when trying to run tests is an exception. Is there a place I can find out what that exception is? I have autospec set up to do the notifications through g

Re: [rspec-users] loading custom matchers into cucumber

2009-07-08 Thread Ben Mabey
Joaquin Rivera Padron wrote: hi there, In a step I need to assert (don't know hoe to translate this into "should" terms) state before keep going, example: Perhaps you need to make an "expectation" instead of an "assert"? :) Given "I have signed up as tom who is an admin" d

Re: [rspec-users] Noob syntax questions regarding rspec book...

2009-07-07 Thread Ben Mabey
Rick DeNatale wrote: On Tue, Jul 7, 2009 at 11:35 AM, Chris Sund wrote: Hey Everyone, I've been working my way through the Rspec book trying to absorb and understand everything. This is my first time with BDD and I'm just trying to figure out some simple syntax stuff. My questions revolve ar

Re: [rspec-users] Test doubles: expect "x" and don't care about anything else

2009-06-29 Thread Ben Mabey
Matt Wynne wrote: On 28 Jun 2009, at 23:02, Wincent Colaiuta wrote: El 28/6/2009, a las 23:04, Matt Wynne escribió: On 28 Jun 2009, at 13:07, Wincent Colaiuta wrote: I've had one of my recurring doubts about test doubles come up again. The full post is here but I'll abbreviate the content

Re: [rspec-users] Integrate or isolate views?

2009-06-28 Thread Ben Mabey
Jesse Crockett wrote: Ben Mabey wrote: On Jun 28, 2009, at 8:32 AM, Jesse Crockett wrote: When I use integrate_views, can I write view spec in what would otherwise be isolated controller spec? Correct, by default RSpec's controller specs will not render the view. This a

Re: [rspec-users] Integrate or isolate views?

2009-06-28 Thread Ben Mabey
On Jun 28, 2009, at 8:32 AM, Jesse Crockett wrote: Hello, I've been trying for two years to pick up BDD. I'm making progress, have just read through the chapters in The RSpec Book on spec'ing views and controllers. What is the difference between using integrate_views and doing what seems

Re: [rspec-users] Testing with activerecord at ThoughtWorks (Stubbing vs real DB)

2009-06-27 Thread Ben Mabey
oren wrote: I am reading the post by Fowler, 'Ruby at ThoughtWorks'. http://martinfowler.com/articl/rubyAtThoughtWorks.html#WasRubyTheRightChoice He talks about testing with activerecord: "Right at the beginning of our use of Ruby, there was a debate on how best to organize testing in the prese

Re: [rspec-users] Where to put macros

2009-06-22 Thread Ben Mabey
On Jun 22, 2009, at 10:37 AM, David Chelimsky wrote: On Mon, Jun 22, 2009 at 11:28 AM, Andrew Premdas wrote: Recently I got some wonderful help from the list to create my NamedAddress module/macro which tests NamedAddresses for a number of different resources. The question I have is where

Re: [rspec-users] Where to put macros

2009-06-22 Thread Ben Mabey
On Jun 22, 2009, at 10:28 AM, Andrew Premdas wrote: Recently I got some wonderful help from the list to create my NamedAddress module/macro which tests NamedAddresses for a number of different resources. The question I have is where should I put this module? At the moment I've got it in s

Re: [rspec-users] The problem with learning RSpec

2009-06-18 Thread Ben Mabey
e is messy. One that I haven't tackled yet but will have to soon is how to test code that runs as a BackgrounDRb worker. I came up with solutions for all of this (except for the BDRb stuff), but I'm not entirely sure of their quality. They certainly feel hackish, but I can't put my

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Ben Mabey
David Chelimsky wrote: On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas wrote: Please have a look at http://gist.github.com/131277 What I'd like to do is create a shared_examples group which I can parametize a method. So my shared example would perhaps use method named_address=, or set_named_

Re: [rspec-users] shared examples sharing methods

2009-06-17 Thread Ben Mabey
David Chelimsky wrote: On Wed, Jun 17, 2009 at 1:19 PM, Matt Wynne wrote: On 17 Jun 2009, at 16:21, David Chelimsky wrote: On Wed, Jun 17, 2009 at 10:14 AM, Andrew Premdas wrote: Please have a look at http://gist.github.com/131277 What I'd like to do is create a shared_examples

Re: [rspec-users] Spork and Merb and rSpec

2009-06-15 Thread Ben Mabey
Scott Taylor wrote: On Jun 15, 2009, at 4:11 PM, Andy Shipman wrote: On 15 Jun 2009, at 14:43, Scott Taylor wrote: Andy Shipman wrote: When running spork on a merb application, whenever a spec is run I get the following error from the Spork server. /opt/local/lib/ruby/gems/1.8/gems/merb-co

Re: [rspec-users] The problem with learning RSpec

2009-06-13 Thread Ben Mabey
Stephen Eley wrote: Ben and Rick, Thanks very much to both of you for the encouraging responses. Your reply, Ben, came just in time as I was starting to wonder if I had made a complete and irrevocable ass of myself. On Fri, Jun 12, 2009 at 10:36 AM, Ben Mabey wrote: In general though I

Re: [rspec-users] The problem with learning RSpec

2009-06-12 Thread Ben Mabey
I'm rambling now, and I've spent *way* too much of my workday on this message, so I'll just summarize: * Some easy things are complicated in RSpec; * Incomplete understanding of RSpec and a framework being spec'ed can create learning deadlock; * Novices need different answers than competent pra

Re: [rspec-users] Given/When/Then blocks on Cucumber

2009-06-05 Thread Ben Mabey
Maurício Linhares wrote: Hello guys, I've been looking at Pyccuracy and found the "Given/Then/When" blocks to be very interesting and easier to understand and write, specially when writting scenarios with more than one of those. An example can be found here: http://www.pyccuracy.org/getting_star

Re: [rspec-users] Given/When/Then blocks on Cucumber

2009-06-05 Thread Ben Mabey
Maurício Linhares wrote: Hello guys, I've been looking at Pyccuracy and found the "Given/Then/When" blocks to be very interesting and easier to understand and write, specially when writting scenarios with more than one of those. An example can be found here: http://www.pyccuracy.org/getting_star

Re: [rspec-users] Disabling cucumber for autotest

2009-05-28 Thread Ben Mabey
Ben Johnson wrote: Hi, For some reason, no matter what, my entire cucumber suite is ran after every auto test. Is there a way to make auto test ignore cucumber all together? Thanks for your help. Hi Ben, The default behaviour is for it to not run the features at all. In fact Cucumber wi

Re: [rspec-users] DeepTest with 1.2.6?

2009-05-28 Thread Ben Mabey
Scott Taylor wrote: Adam Anderson wrote: Just curious if anyone is running DeepTest with rspec 1.2.6. I can't even do a '$ rake -T' on the deep-test repo at git://github.com/qxjit/deep-test.git When I try to run deep_test using their provided rspec exa

Re: [rspec-users] thoughts on this?

2009-05-27 Thread Ben Mabey
Stephen Eley wrote: On Wed, May 27, 2009 at 8:19 PM, Matt Wynne wrote: http://robertlally.com/post/bdd-not-so-much *shrug* I'll add a *sigh* as well... Robert says his "problem is with the definition of BDD itself". He points out that no one can really agree on what BDD is exac

Re: [rspec-users] Cucmber Step to insert Test Data into Database

2009-05-27 Thread Ben Mabey
Scott Taylor wrote: David Chelimsky wrote: On Wed, May 27, 2009 at 5:20 AM, Smita Sreekanth wrote: Hi, We run the feature created for a form to identify the fields and also to add data into the respective fields. But while running the cucumber features, all the scenario and steps are get

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Mabey
Scott Taylor wrote: On May 26, 2009, at 2:31 PM, Ben Mabey wrote: Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey <mailto:b...@benmabey.com>> wrote: Well, so Spork was really created with testing in mind. It i

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-26 Thread Ben Mabey
Scott Taylor wrote: On May 26, 2009, at 1:22 PM, Mark Wilden wrote: On Sun, May 24, 2009 at 10:17 PM, Ben Mabey <mailto:b...@benmabey.com>> wrote: Well, so Spork was really created with testing in mind. It is more general purpose than spec_server though. You can use it

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-24 Thread Ben Mabey
Scott Taylor wrote: Ben Mabey wrote: Scott Taylor wrote: Ben Johnson wrote: Did anyone ever figure out the factory_girl / machinist issues? I am having the same problems and can figure out how to fix it for the life of me. The first run works fine, then afterwards I get a bunch of these

Re: [rspec-users] spec_server errors when reloading fixture replacement pl

2009-05-23 Thread Ben Mabey
Scott Taylor wrote: Ben Johnson wrote: Did anyone ever figure out the factory_girl / machinist issues? I am having the same problems and can figure out how to fix it for the life of me. The first run works fine, then afterwards I get a bunch of these errors: No blueprint for class Venue Any

Re: [rspec-users] Cucumber: Running one feature under one profile

2009-05-22 Thread Ben Mabey
aslak hellesoy wrote: Hey Folks, Aargh profiles. The initial intention was that you could just do cucumber -p foo. And then you wouldn't have to type a lot of arguments. The intention was *not* to use -p along with additional arguments, although cucumber lets you do it by merging stuff t

Re: [rspec-users] Change cache_classes on the fly?

2009-05-20 Thread Ben Mabey
tatyree wrote: Strange request, I know...also seems pretty unlikely that it will work, but: Any thoughts on how I might change the setting on the fly (or stub it)? I'm stopping certain classes loading in production, and I'd like to be able to test the behavior without having to manually change

Re: [rspec-users] Cucumber vs Rails Fixtures

2009-05-20 Thread Ben Mabey
Phlip wrote: Cucumberists: FYI, Cucumber now has it's own mailing list: http://groups.google.com/group/cukes Apologies for not jumping into some wild alternate fixture (or mock!) system, but the unit tests at my new day gig are >cough< hanging by a thread as it is. I need to show off som

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Ben Mabey
Ben Mabey wrote: Luke Melia wrote: Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Cheers, Luke Have you seen what Matt added recently? https://rspec.lighthouseapp.com/projects/16211/tickets/330-grace

Re: [rspec-users] autotest?

2009-05-19 Thread Ben Mabey
Denis Haskin wrote: Can someone point me to some decent doc on autotest? Everything I'm finding seems either pretty old, or says "autotest and rspec work out of the box", which it isn't for me... I installed the grosser-autotest gem (just guessing) and when I run autotest it only runs (legac

Re: [rspec-users] [Cucumber] Fail a scenario from After or AfterStep

2009-05-19 Thread Ben Mabey
Luke Melia wrote: Any further thoughts on this, Aslak? I'd prefer to go with a solution in line with the future direction of Cucumber if possible. Cheers, Luke Have you seen what Matt added recently? https://rspec.lighthouseapp.com/projects/16211/tickets/330-gracefully-handle-exceptions-in-a

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 broke my rake tasks! 0.3.5

2009-05-15 Thread Ben Mabey
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 lines added to the tasks none of my steps are recognised (see second file i

Re: [rspec-users] Rails HTML error page in the console.

2009-05-13 Thread Ben Mabey
Matt Wynne wrote: I'm still bugged by the fact that when I get an exception during a feature run (e.g. Couldn't find partial) then what I see in the console is all the HTML to report that error in a browser. I have had a few ideas for this bubbling around at the back of my mind. I wondered wh

Re: [rspec-users] Top level object in model specs

2009-05-12 Thread Ben Mabey
Steven Rogers wrote: I want to stub a global method in a model spec, but I can't figure out what's the equivalent in model specs for controller.stub! in controller specs and template.stub! in view specs . . . at least, it seems like I need to do that in order to make acts_as_audited happy in

Re: [rspec-users] Running single spec files -- how?

2009-05-11 Thread Ben Mabey
court3nay wrote: Before upgrading from 1.1.11 to 1.2.4 I used to be able to do this: ruby spec/models/user_spec.rb Now it looks like you have to do script/spec spec/models/user_spec.rb Or something like this, which is actually kinda cool: script/spec spec/*/user* Is that correct? Am I

Re: [rspec-users] Cucumber 0.3.3 - Examples:

2009-05-11 Thread Ben Mabey
James Byrne wrote: Am I correct when I infer that the "Examples" keyword is now only valid in a Scenario Outline? If so, in what version did this change take place? Yes... "Examples" is only valid in Scenario Outlines, but you can also use "Scenarios" as well. I don't remember being able

Re: [rspec-users] Test JSON with Cucumber

2009-05-11 Thread Ben Mabey
Bill Kocik wrote: Hi Folks - I'm hoping someone has come before me in trying to do this. I want to use Cucumber to acceptance-test my JSON output. So far all I can do is validate that the JSON is valid, with this step: Then /^I should get valid JSON$/ do assert_nothing_raised do ActiveSup

Re: [rspec-users] [cucumber] how to debug cucumber with netbeans?

2009-05-09 Thread Ben Mabey
Jean-Michel Garnier wrote: Jean-Michel Garnier wrote: 3 months ago, I submitted a patch to cucumber so I could run cucumber from a ruby script and use the debugger in netbeans (https://rspec.lighthouseapp.com/projects/16211/tickets/128-running-feature-from-ruby-script) It worked well at the

Re: [rspec-users] [cucumber] how to debug cucumber with netbeans?

2009-05-08 Thread Ben Mabey
Jean-Michel Garnier wrote: 3 months ago, I submitted a patch to cucumber so I could run cucumber from a ruby script and use the debugger in netbeans (https://rspec.lighthouseapp.com/projects/16211/tickets/128-running-feature-from-ruby-script) It worked well at the time but I can't make it work w

Re: [rspec-users] [cucumber] -n command line option looks in every feature file

2009-05-08 Thread Ben Mabey
Mark Wilden wrote: Running 'cucumber -n "asdf" features/challenge.feature' seems to load every feature file from the Rails root on down. In particular, it loads example features in vendor/gems like Ben's email_spec which requires Rails 2.2.2. This makes the command fail for us, since we've fro

Re: [rspec-users] Problem verifying routing error

2009-05-08 Thread Ben Mabey
Randy Harmon wrote: Hi, When upgrading to rspec/rspec-rails 1.2.6 gem (from 1.1.12), I'm having a new problem verifying routes that should not exist. This is to support something like this in routes.rb: map.resources :orders do |orders| orders.resources :items, :except => [:index,:show] en

Re: [rspec-users] top posting and plain text

2009-05-06 Thread Ben Mabey
Rick DeNatale wrote: On Wed, May 6, 2009 at 7:33 PM, Ben Mabey wrote: + 1 aslak hellesoy wrote: Folks, *snip* Thanks, Aslak So let me get this right, you agreed with Aslak that you shouldn't top post. by top posting lol.. Yes. :) Sarcasm somethings doesn&#

Re: [rspec-users] top posting and plain text

2009-05-06 Thread Ben Mabey
+ 1 aslak hellesoy wrote: Folks, *snip* Thanks, Aslak ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users ___ rspec-users mailing list rspec-u

Re: [rspec-users] cucumber - referential (inherited?) scenarios

2009-05-02 Thread Ben Mabey
specially, given that I don't use steps within steps a whole lot.) That said it seems like a reasonable request... Any other opinions on the suggested feature? Should we move the discussion to lighthouse? -Ben That'd be bloody brilliant. Okay so maybe I should go fork it and do it

Re: [rspec-users] cucumber - referential (inherited?) scenarios

2009-05-02 Thread Ben Mabey
Julian Leviston wrote: You know what'd be awesome? If Cucumber scenarios were referential. I mean, wouldn't it be awesome if you could refer to them... so you could build on them... So in a login.feature I'd define: Scenario: logging in Given that a default user exists And I am on the login

Re: [rspec-users] cucumber - how to bootstrap outside of rails?

2009-05-02 Thread Ben Mabey
Aslak Hellesøy wrote: I use mkdir and touch. Me too Yeah, "mkdir -p features/support && mkdir -p features/step_defnintions && touch features/support/env.rb" is really all you need. However, for new projects I really like to use jeweler to bootstrap all the setup for Cucumber, RSpec, R

Re: [rspec-users] [Cucumber] Using Cucumber to test Erlang servers directly

2009-05-02 Thread Ben Mabey
Jim Morris wrote: I don't know if this will interest anyone, but I thought it was a pretty cool use of Cucumber :) I've posted a Blog article on how I use Cucumber to test an Erlang Server directly by talking to my Erlang Nodes. http://blog.wolfman.com/articles/2009/5/2/using-cucumber-to-test-e

Re: [rspec-users] Command to run a single scenario using cucumber

2009-05-01 Thread Ben Mabey
Anil Gollaa wrote: Hi, I have installed cucumber and was able to run all the scenarios using rake features, but can body tell me. What is the command to run a single scenario? Thanks, Anil kumar. bma...@benzii:~/$ cucumber --help Usage: cucumber [options] [ [FILE|DIR|URL][:LINE[:LINE]*] ]+

Re: [rspec-users] Plugin to generate text logs using cucumber.

2009-05-01 Thread Ben Mabey
lor flag. FYI, you can specify multiple formatters if you need to. "cucumber --help" for more. Ben Mabey ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Before and After blocks for individual feature files?

2009-05-01 Thread Ben Mabey
Korny Sietsma wrote: Celerity is very cool - when it works. It didn't work with out messy combination of javascript libraries, alas. (Dojo 0.4-ish for legacy bits, GWT for new bits) - apparently it will work with either of these frameworks, but for us, with both, it died mysteriously (and we ga

Re: [rspec-users] [cucumber] Bug introduced in 0.3.1

2009-04-30 Thread Ben Mabey
Lee Hambley wrote: Hi All, I'm new to the list, but a happy cucumber user with a few weeks experience now... a bit of a shock this morning when someone upgraded here and happened to jump up to 0.3.1, we're seeing the following output.. I haven't had chance to investigate more, but I will tr

Re: [rspec-users] Noob question

2009-04-29 Thread Ben Mabey
ious on how you are solving them. Thanks for sharing! -Ben On Thu, Apr 30, 2009 at 9:32 AM, Ben Mabey wrote: Korny Sietsma wrote: True, but cucumber is useful for lots of different kinds of projects. I'm currently using it to build a java webapp, so I don't need much beyond

Re: [rspec-users] Noob question

2009-04-29 Thread Ben Mabey
Korny Sietsma wrote: True, but cucumber is useful for lots of different kinds of projects. I'm currently using it to build a java webapp, so I don't need much beyond cucumber, selenium, and selenium-client. I'm curious, with your current setup do you insert data directly into your database (i

Re: [rspec-users] Cucumber - Testing ActionMailer

2009-04-29 Thread Ben Mabey
James Byrne wrote: James Byrne wrote: I have reached this point in testing using email-spec: ... The email To: header value and the current_email_address are the same insofar as I can tell. But the email_spec matcher is not finding that address in the deliveries array. Any ideas

Re: [rspec-users] Before and After blocks for individual feature files?

2009-04-28 Thread Ben Mabey
ut that and how they've had to add additional wait commands in. But, I really don't know any details. Sorry! Your best bet is to ask in #webrat, or on it's google group or lighthouse account. -Ben 1. http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user

Re: [rspec-users] Before and After blocks for individual feature files?

2009-04-28 Thread Ben Mabey
s. In your case you wanted additional context for one of your scenarios in the table... this means that you probably should have a whole new scenario like above. Your current solution obfuscates the additional context and therefore looses some of the documentation value that Cucumber offers

Re: [rspec-users] Before and After blocks for individual feature files?

2009-04-28 Thread Ben Mabey
Arco wrote: I'd like to do this: Feature: user signup Before: Given I have a cleaned up database Scenario Outline: Sign Up Given I am on the signup page When I sign up using Then I should see Examples: |userid |message | |userX |successful si

Re: [rspec-users] Cucumber - Testing ActionMailer

2009-04-27 Thread Ben Mabey
James Byrne wrote: I need some help with this. I have installed email-spec (courtesy of BMabey) and I have configure things thusly: Scenario: E-Mail Exchange Rates to notify parties Given a currency exchange feed from the Bank of Canada When the currency exchange retrieval script runs

Re: [rspec-users] [cucumber] Where does STDOUT go?

2009-04-27 Thread Ben Mabey
James Byrne wrote: If one invokes a Ruby script from a cucumber step definition and that script contains "puts" statements then where does the output go? I have a script that when run from the command line displays "puts" output in the terminal session, but when run from a cucumber step definiti

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Ben Mabey
Ben Mabey wrote: Rick DeNatale wrote: On Mon, Apr 27, 2009 at 11:42 AM, Ben Mabey wrote: Do you happen to be explicitly requiring any of your step definitions from your env.rb or other files? What does your env.rb look like? Yes, env.rb is right out of the RSpec book B4.0

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Ben Mabey
Rick DeNatale wrote: On Mon, Apr 27, 2009 at 11:42 AM, Ben Mabey wrote: Do you happen to be explicitly requiring any of your step definitions from your env.rb or other files? What does your env.rb look like? Yes, env.rb is right out of the RSpec book B4.0 'printing&

Re: [rspec-users] Problems running features with Textmate Cucumber bundle

2009-04-27 Thread Ben Mabey
Rick DeNatale wrote: On Mon, Apr 27, 2009 at 10:07 AM, aslak hellesoy wrote: On Mon, Apr 27, 2009 at 3:47 PM, Rick DeNatale wrote: On Mon, Apr 27, 2009 at 8:13 AM, Rick DeNatale wrote: On Sun, Apr 26, 2009 at 11:38 PM, Ben Mabey wrote: Rick DeNatale wrote

  1   2   3   4   5   >