Re: [rspec-users] Help solve distributed cucumber feature pain in 2 minutes or less

2013-03-11 Thread David Chelimsky
You'll probably get more and better feedback from https://groups.google.com/forum/?fromgroups#!forum/cukes On Mon, Mar 11, 2013 at 3:31 PM, Dan Williams wrote: > Hey everybody, > > I have been beating my head on the wall when dealing with creating cucumber > features in a distributed work environ

[rspec-users] Help solve distributed cucumber feature pain in 2 minutes or less

2013-03-11 Thread Dan Williams
Hey everybody,I have been beating my head on the wall when dealing with creating cucumber features in a distributed work environment.  So, we decided to make a collaborative editor that solves this problem. Do have two minutes to help guide us?https://docs.google.com/forms/d/1tQbUHzDyUARHbbVvsy143p

Re: [rspec-users] help a new rspec user

2012-11-08 Thread ishi soichi
thanks. I will look for Factory gems. soichi 2012/11/9 Cynthia Kiser > Quoting ishi soichi : > > The generated default controller_spec.rb is > > > > describe "GET index" do > > it "assigns all gives as @gives" do > > give = Give.create! valid_attributes > > get :index, {}, va

Re: [rspec-users] help a new rspec user

2012-11-08 Thread Cynthia Kiser
Quoting ishi soichi : > The generated default controller_spec.rb is > > describe "GET index" do > it "assigns all gives as @gives" do > give = Give.create! valid_attributes > get :index, {}, valid_session > assigns(:gives).should eq([give]) > end > end Your test abov

[rspec-users] help a new rspec user

2012-11-07 Thread ishi soichi
Rails 3.1.3 rspec latest I have started using rspec a few days ago, although I had been developing in Rails for a while. I have developed a Rails application without thinking about tests at all, but recently realized the importance of BDD. The application has models and controllers that are alrea

[rspec-users] Help for a project

2012-01-07 Thread Fabricio Foruria
Hi David, I am reading your book about Rspec because I am starting a framework from scratch for my job for a big client (american express).. and I would like ask you some question regarding some things I would like accomplish but I don`t undestand how could be done. Please let me know if you don`t

[rspec-users] Help with the rspec and the xpath

2011-07-10 Thread Parag Dave
Hi Geeks, i need help with the rspec, Some time i having a problem with locating the element with the xpath Same element, i can able to select some time where some time i can not. Is there a bug or i need to do some specific for that? My way to locate xpath browser.link(:xpath,"/html/body/div[@i

Re: [rspec-users] help with rspec

2011-06-12 Thread David Chelimsky
On Jun 12, 2011, at 2:25 AM, שלומי צדוק wrote: > Hi all, > My name is Shlomi Zadok - I am an old time PHP (mainly Drupal) developer and > I am doing my first application on Ruby on Rails ( I just love it!!) > I am trying to test my application with rspec and I am having problems. > > I have to

[rspec-users] help with rspec

2011-06-12 Thread שלומי צדוק
Hi all, My name is Shlomi Zadok - I am an old time PHP (mainly Drupal) developer and I am doing my first application on Ruby on Rails ( I just love it!!) I am trying to test my application with rspec and I am having problems. I have to admit that I rushed with the development and neglected the tes

Re: [rspec-users] Help to spec a rails helper method that uses content_for

2011-05-25 Thread Justin Ko
On Tue, May 24, 2011 at 10:34 PM, Paul P. wrote: > John, > > I know this is quite old, but I wanted to apply your same example in > Rspec 2. I'm getting the following when I attempt to do so. > > application_helper.rb > === > module ApplicationHelper > > # Return a titl

Re: [rspec-users] Help to spec a rails helper method that uses content_for

2011-05-24 Thread Paul P.
John, I know this is quite old, but I wanted to apply your same example in Rspec 2. I'm getting the following when I attempt to do so. application_helper.rb === module ApplicationHelper # Return a title on a per-page basis. def title(page_title) content_for(:t

Re: [rspec-users] Help needed for instslling rspec

2010-07-15 Thread David Chelimsky
On Jul 15, 2010, at 12:36 PM, Patel, Mihir wrote: > Hi All, >I am new to BDD. I have ruby 1.8.7 on my RHEL5 computer. I am trying to > install RSpec by “gem install rspec” but I get an error saying : “could not > find rspec locally or in a repository”, Please help me out. Please type "gem

[rspec-users] Help needed for instslling rspec

2010-07-15 Thread Patel, Mihir
Hi All, I am new to BDD. I have ruby 1.8.7 on my RHEL5 computer. I am trying to install RSpec by "gem install rspec" but I get an error saying : "could not find rspec locally or in a repository", Please help me out. Regards, [ Mihir Patel | SDE Intern | +919 889 9537 | [email protected]

Re: [rspec-users] Help with nested routes test in Rails 3

2010-07-05 Thread David Chelimsky
On Jul 4, 2010, at 3:28 PM, Lalish-Menagh, Trevor wrote: > > On Sat, Jul 3, 2010 at 2:40 AM, Lalish-Menagh, Trevor > wrote: >> Hi all, >> >> I must be doing something wrong here. Could someone point me in the >> right direction? I am trying to test my nested resources in Rails 3. >> >> The rout

Re: [rspec-users] Help with nested routes test in Rails 3

2010-07-04 Thread Lalish-Menagh, Trevor
Hi again, I figured out the issue. RSpec's route_to wraps Rails' assert_routing, which checks two things: - Rails recognizes the given path and routes it to a particular spot in your application (via assert_recognizes) - a particular set of options generate a particular path (via assert_generates)

[rspec-users] Help with nested routes test in Rails 3

2010-07-02 Thread Lalish-Menagh, Trevor
Hi all, I must be doing something wrong here. Could someone point me in the right direction? I am trying to test my nested resources in Rails 3. The route: resources :students do resources :days end The test: it "recognizes and generates #index" do { :get => "/students/1/da

Re: [rspec-users] help me refactor a step for finding href in specific link

2010-04-02 Thread oren
thanks! i'll use cucumber list next time. On Mar 31, 11:09 pm, David Chelimsky wrote: > On Mar 31, 2010, at 5:13 PM, Oren Golan wrote: > > > > > I want to verify the href is correct: > > > >    http://www.com.com";>Website > > > > > my step in the cucumber file: > > And the "website" class shou

Re: [rspec-users] help me refactor a step for finding href in specific link

2010-03-31 Thread David Chelimsky
On Mar 31, 2010, at 5:13 PM, Oren Golan wrote: > I want to verify the href is correct: > >http://www.com.com";>Website > > > my step in the cucumber file: > And the "website" class should have "www.happyhour.com" > > the step definition: > Then /^the "([^\"]*)" class should have "([^\"]*)"

[rspec-users] help me refactor a step for finding href in specific link

2010-03-31 Thread Oren Golan
I want to verify the href is correct: http://www.com.com";>Website my step in the cucumber file: And the "website" class should have "www.happyhour.com" the step definition: Then /^the "([^\"]*)" class should have "([^\"]*)"$/ do |link, url| response.should have_selector(".#{link}") do |

[rspec-users] Help with w3c html validation on every rspec requests

2009-12-28 Thread mix
Hi, I'm studying rspec in these days (the rspec book is really great... i'll wait for the missing chapters and a next "rspec advanced book" :) ). But for now i'm trying to solve a problem. I'm a kind of w3c validation fanatic, i mean, i like to give my clients well written code (following "The Stan

Re: [rspec-users] Help in Stubing is_admin? method

2009-10-20 Thread Ashley Moran
On 20 Oct 2009, at 19:31, [email protected] wrote: Thank you for your replay. I did not mention that I have a method called in before_filter to set @user. before_filter :find_current, :only => [:show, :edit, :update, :destroy] The method is def find_current @user = User.find(g

Re: [rspec-users] Help in Stubing is_admin? method

2009-10-19 Thread Ashley Moran
On 19 Oct 2009, at 21:55, Elza wrote: def edit @user = User.find(get_param(:id, :integer)) @user = current_user if !is_admin? end Hi Elza Am I right thinking your intent here is the same as: def edit @user = if is_admin? User.find(get_param(:id, :integer)) else

[rspec-users] Help with controllers specs

2009-10-19 Thread Elza Di Sirio
I had some doubts while specing the action edit for User Model My controller def edit @user = User.find(get_param(:id, :integer)) @user = current_user if !is_admin? end *** My spec describe "GET edit" do ###

[rspec-users] Help in Stubing is_admin? method

2009-10-19 Thread Elza
My controller def edit @user = User.find(get_param(:id, :integer)) @user = current_user if !is_admin? end * My spec describe "GET edit" do ## should_require_login :get, :edit #

Re: [rspec-users] Help me with Controllers spec

2009-10-16 Thread Matt Wynne
You're getting mixed up between stubbing the methods on the class (Brand) and the instance (Brand.new) Try the corrections below: On 16 Oct 2009, at 05:25, Elza wrote: I am starting with Rspec and I am having some errors in the Get/index Can someone help me with this? describe BrandsContro

[rspec-users] Help me with Controllers spec

2009-10-15 Thread Elza
I am starting with Rspec and I am having some errors in the Get/index Can someone help me with this? describe BrandsController, 'GET /index' do ## should_require_login :get, :index ##

Re: [rspec-users] Help with global before behavior...

2009-05-08 Thread David Chelimsky
On Fri, May 8, 2009 at 1:51 PM, Denis Haskin wrote: > Okay, I guess I can do this with shared examples.  I added to my > spec_helper.rb: > > describe "an admin user is signed in", :shared => true do >  before( :each ) do >   @admin_user = Factory(:admin_user) >   login_as @admin_user >  end > end

Re: [rspec-users] Help with global before behavior...

2009-05-08 Thread Scott Taylor
Denis Haskin wrote: I'm having a devil of a time getting some global before behavior to work the way I think it should. I have a set of controllers that are used only by administrative users, so login is required. To run examples just against the functionality, ideally I'd like to be able to

Re: [rspec-users] Help with global before behavior...

2009-05-08 Thread Denis Haskin
Okay, I guess I can do this with shared examples. I added to my spec_helper.rb: describe "an admin user is signed in", :shared => true do before( :each ) do @admin_user = Factory(:admin_user) login_as @admin_user end end and then in each controller that needs that behavior: it_should

[rspec-users] Help with global before behavior...

2009-05-08 Thread Denis Haskin
I'm having a devil of a time getting some global before behavior to work the way I think it should. I have a set of controllers that are used only by administrative users, so login is required. To run examples just against the functionality, ideally I'd like to be able to set up a before() th

Re: [rspec-users] Help with some basics

2009-05-01 Thread Andrew Timberlake
On Fri, May 1, 2009 at 6:57 PM, Samuel Soares flores wrote: > >> >> Managed to find the problem, the class ProductTemplate wasn't being >> loaded so "it" wasn't working on an object. >> The error is not very useful in this situation but I'm moving forward >> again. >> > > How did you solved it? I'

Re: [rspec-users] Help with some basics

2009-05-01 Thread Samuel Soares flores
> > Managed to find the problem, the class ProductTemplate wasn't being > loaded so "it" wasn't working on an object. > The error is not very useful in this situation but I'm moving forward > again. > How did you solved it? I'm having the same problem. -- Posted via http://www.ruby-forum.com/

Re: [rspec-users] Help with some basics

2009-04-30 Thread Andrew Timberlake
On Thu, Apr 30, 2009 at 10:04 PM, David Chelimsky wrote: > On Thu, Apr 30, 2009 at 2:55 PM, Andrew Timberlake > wrote: >> It gives me the same error when I run >> rake spec >> spec specs/ >> or >> autospec >> >> It also gives the same error with specs like >> it { should_not be_nil } >> and >> it

Re: [rspec-users] Help with some basics

2009-04-30 Thread David Chelimsky
On Thu, Apr 30, 2009 at 2:55 PM, Andrew Timberlake wrote: > It gives me the same error when I run > rake spec > spec specs/ > or > autospec > > It also gives the same error with specs like > it { should_not be_nil } > and > it { should respond_to(:name) } Those are internal to rspec and I can ass

Re: [rspec-users] Help with some basics

2009-04-30 Thread Andrew Timberlake
It gives me the same error when I run rake spec spec specs/ or autospec It also gives the same error with specs like it { should_not be_nil } and it { should respond_to(:name) } On Thursday, April 30, 2009, David Chelimsky wrote: > On Thu, Apr 30, 2009 at 9:44 AM, Andrew Timberlake > wrote: >>

Re: [rspec-users] Help with some basics

2009-04-30 Thread David Chelimsky
On Thu, Apr 30, 2009 at 9:44 AM, Andrew Timberlake wrote: > I'm suddenly getting an error on my specs > > /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_methods.rb:24:in > `description': No description supplied for example declared on > /home/andrew/dev/rhythm/website/spec/

[rspec-users] Help with some basics

2009-04-30 Thread Andrew Timberlake
I'm suddenly getting an error on my specs /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.5/lib/spec/example/example_methods.rb:24:in `description': No description supplied for example declared on /home/andrew/dev/rhythm/website/spec/models/product_template_spec.rb:4 (Spec::Example::NoDescriptionError

[rspec-users] Help make rspec-1.2 a smooth upgrade

2009-03-06 Thread David Chelimsky
Hi all, I'm planning to release rspec-1.2 and rspec-rails-1.2 shortly after rails-2.3 goes final (rails-2.3.1 was just released as RC2). There are a couple of loose ends right now, and I need your help in two important areas. I've curtailed releasing github gems, so please clone, build and install

Re: [rspec-users] Help with regexp in matcher

2009-01-16 Thread Matt Wynne
On 15 Jan 2009, at 22:13, James Byrne wrote: We have, in consequence, gone through and removed the term login from all code use as well; replacing it with authenticate. So, for example, the authentication form now says: To Proceed Please Authenticate Yourself I am sometimes (ok, mostly) sl

Re: [rspec-users] Help with regexp in matcher

2009-01-15 Thread aslak hellesoy
On Thu, Jan 15, 2009 at 11:13 PM, James Byrne wrote: > Matt Wynne wrote: > > > > > +1 to all that. I feel like you get lectured quite a bit by this list > > James, but you'd do well to heed the advice of some battle-hardened > > journeymen, IMO. > > > > I thought that you might like to know that,

Re: [rspec-users] Help with regexp in matcher

2009-01-15 Thread James Byrne
Matt Wynne wrote: > > +1 to all that. I feel like you get lectured quite a bit by this list > James, but you'd do well to heed the advice of some battle-hardened > journeymen, IMO. > I thought that you might like to know that, after reflecting on this overnight, I took this matter up in a desi

Re: [rspec-users] Help with regexp in matcher

2009-01-14 Thread James Byrne
Matt Wynne wrote: > > I actually rather like the unambiguous, and jargon-free 'current > authenticated session' phraseology, but I'm not one of your users, so > that doesn't really matter! I do too, but I am not the president either... > > I have one more suggestion. From all these different w

Re: [rspec-users] Help with regexp in matcher

2009-01-14 Thread Matt Wynne
On 13 Jan 2009, at 20:10, James Byrne wrote: Stephen Eley wrote: On Tue, Jan 13, 2009 at 10:41 AM, James Byrne wrote: Logins are a pervasive feature of this application Which is exactly why you should standardize. If you try to be accommodating toward unclear communication, you're just g

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread James Byrne
Stephen Eley wrote: > On Tue, Jan 13, 2009 at 10:41 AM, James Byrne > wrote: >> >> Logins are a pervasive feature of this application > > Which is exactly why you should standardize. If you try to be > accommodating toward unclear communication, you're just going to > create confusion when peop

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Zach Dennis
On Tue, Jan 13, 2009 at 12:55 PM, Matt Wynne wrote: > > On 13 Jan 2009, at 17:14, Mark Wilden wrote: > >> On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: >> >> Logins are a pervasive feature of this application and so, rather than >> waste effort on policing the feature syntax, I thought it b

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread James Byrne
Matt Wynne wrote: . > > +1 to all that. I feel like you get lectured quite a bit by this list > James, but you'd do well to heed the advice of some battle-hardened > journeymen, IMO. > > I do hope that I do not give the impression that I resent anything that anyone has written in response to my

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Matt Wynne
On 13 Jan 2009, at 17:14, Mark Wilden wrote: On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: Logins are a pervasive feature of this application and so, rather than waste effort on policing the feature syntax, I thought it best just to accommodate the likely variations from the start. P

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Stephen Eley
On Tue, Jan 13, 2009 at 10:41 AM, James Byrne wrote: > > Logins are a pervasive feature of this application Which is exactly why you should standardize. If you try to be accommodating toward unclear communication, you're just going to create confusion when people need to get things done. Someon

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread aslak hellesoy
On Tue, Jan 13, 2009 at 6:14 PM, Mark Wilden wrote: > On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: > >> >> Logins are a pervasive feature of this application and so, rather than >> waste effort on policing the feature syntax, I thought it best just to >> accommodate the likely variations

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread Mark Wilden
On Tue, Jan 13, 2009 at 7:41 AM, James Byrne wrote: > > Logins are a pervasive feature of this application and so, rather than > waste effort on policing the feature syntax, I thought it best just to > accommodate the likely variations from the start. Premature flexibility is one of the roots o

Re: [rspec-users] Help with regexp in matcher

2009-01-13 Thread James Byrne
Thanks for all the advise and corrections. I ended up with this: When /\bsee a (?:log|sign)(?: ?)[io]n success message/ do # login | log in | logon | log on | signin ... Then "see the login ok message" end As to the issue of whether this is being too clever by half: Perhaps. I have to consi

Re: [rspec-users] Help with regexp in matcher

2009-01-12 Thread aslak hellesoy
On Mon, Jan 12, 2009 at 11:35 PM, Tim Glen wrote: > >> This is giving me an error: >> >> When /?:(log|sign)?:(i|o)n success message/ do >> Then "welcome message" >> end >> > > > I could be wrong, but I believe you're looking for this instead? > When /(?:log|sign)(?:i|o)n success message/ do > A

Re: [rspec-users] Help with regexp in matcher

2009-01-12 Thread Stephen Eley
On Mon, Jan 12, 2009 at 4:50 PM, James Byrne wrote: > > When /?:(log|sign)?:(i|o)n success message/ do > Then "welcome message" > end It's a syntax error on that first question mark, the one right after the slash. A ? in a regex signifies that whatever came just before it may appear 0 or 1 time

Re: [rspec-users] Help with regexp in matcher

2009-01-12 Thread Ben Mabey
On 1/12/09 2:50 PM, James Byrne wrote: This is giving me an error: When /?:(log|sign)?:(i|o)n success message/ do Then "welcome message" end The ?: needs to be inside your group if you don't want to capture it... so: When /(?:log|sign)(?:i|o)n success message/ do FWIW, I have found ht

Re: [rspec-users] Help with regexp in matcher

2009-01-12 Thread Tim Glen
This is giving me an error: When /?:(log|sign)?:(i|o)n success message/ do Then "welcome message" end I could be wrong, but I believe you're looking for this instead? When /(?:log|sign)(?:i|o)n success message/ do hope that helps, timg ___ rspec-u

[rspec-users] Help with regexp in matcher

2009-01-12 Thread James Byrne
This is giving me an error: When /?:(log|sign)?:(i|o)n success message/ do Then "welcome message" end To the effect that: /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': ./features/components/login/step_definitions/login_steps.rb:21: invalid regular express

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread Stephen Eley
On Tue, Jan 6, 2009 at 1:24 PM, David Chelimsky wrote: > > I'd refine that a bit: learn both and decide *when to apply each*. > > Choosing one style over the other limits your toolbox and consequently > your ability to operate in different contexts. True, and good point. -- Have Fun, Steve

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread Matt Darby
On Jan 6, 2009, at 1:16 PM, Stephen Eley wrote: On Tue, Jan 6, 2009 at 10:53 AM, Matt Darby wrote: I'm stumped. How would I go about specing the "update_sandbox" method? I couldn't hope to compete with David's answer when it comes to specifics, but more generally, it occurs to me that your

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread David Chelimsky
On Tue, Jan 6, 2009 at 12:16 PM, Stephen Eley wrote: > On Tue, Jan 6, 2009 at 10:53 AM, Matt Darby wrote: >> I'm stumped. How would I go about specing the "update_sandbox" method? > > I couldn't hope to compete with David's answer when it comes to > specifics, but more generally, it occurs to me

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread Stephen Eley
On Tue, Jan 6, 2009 at 10:53 AM, Matt Darby wrote: > I'm stumped. How would I go about specing the "update_sandbox" method? I couldn't hope to compete with David's answer when it comes to specifics, but more generally, it occurs to me that your question is a little imprecise and that could point

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread David Chelimsky
On Tue, Jan 6, 2009 at 10:41 AM, Matt Darby wrote: > On Jan 6, 2009, at 11:27 AM, David Chelimsky wrote: > >> On Tue, Jan 6, 2009 at 9:53 AM, Matt Darby wrote: >>> >>> I'm stumped. How would I go about specing the "update_sandbox" method? >>> # bids_controller: >>> def new >>> @bid = Bid.new >

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread Matt Darby
On Jan 6, 2009, at 11:27 AM, David Chelimsky wrote: On Tue, Jan 6, 2009 at 9:53 AM, Matt Darby wrote: I'm stumped. How would I go about specing the "update_sandbox" method? # bids_controller: def new @bid = Bid.new respond_to do |wants| wants.html { redirect_to job_bids_path(@j

Re: [rspec-users] Help with controller spec?

2009-01-06 Thread David Chelimsky
On Tue, Jan 6, 2009 at 9:53 AM, Matt Darby wrote: > I'm stumped. How would I go about specing the "update_sandbox" method? > # bids_controller: > def new > @bid = Bid.new > > respond_to do |wants| > wants.html { redirect_to job_bids_path(@job) } > wants.js { > update_

[rspec-users] Help with controller spec?

2009-01-06 Thread Matt Darby
I'm stumped. How would I go about specing the "update_sandbox" method? # bids_controller: def new @bid = Bid.new respond_to do |wants| wants.html { redirect_to job_bids_path(@job) } wants.js { update_sandbox do render_to_string :partial => 'new', :locals =

Re: [rspec-users] Help: Attempts to run specs quitting midstream

2008-11-18 Thread Matt Griffith
Matt Wynne wrote: > It would be really helpful if you could file a bug report so that > people can get onto fixing it: > http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/new RSpec's Lighthouse is broken. I've tried submitting 2 tickets with no luck. If someone on the RSpec team needs mo

Re: [rspec-users] Help: Attempts to run specs quitting midstream

2008-11-18 Thread Matt Griffith
Matt Wynne wrote: > It would be really helpful if you could file a bug report so that > people can get onto fixing it: > http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/new Yep I'm trying to narrow it down to the simplest repro case. Unfortunately I can only reproduce it in my rails ap

Re: [rspec-users] Help: Attempts to run specs quitting midstream

2008-11-18 Thread Matt Wynne
On 18 Nov 2008, at 17:06, Matt Griffith wrote: Evan Dorn wrote: I am having a very frustrating problem running specs on my current project. When I run tests en masse with "rake spec" or with autotest, it frequently quits without completing all the tests. It also sometimes runs the tests in

Re: [rspec-users] Help: Attempts to run specs quitting midstream

2008-11-18 Thread Matt Griffith
Evan Dorn wrote: > I am having a very frustrating problem running specs on my current > project. When I run tests en masse with "rake spec" or with autotest, > it frequently quits without completing all the tests. It also > sometimes runs the tests in multiple batches, giving more than one > res

[rspec-users] Help

2008-11-01 Thread Victor Asteinza
age: 1 Date: Thu, 30 Oct 2008 21:23:31 -0400 From: Scott Taylor <[EMAIL PROTECTED]> Subject: Re: [rspec-users] Help: Attempts to run specs quitting midstream To: [email protected] Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=US-ASCII; format=flowed; del

Re: [rspec-users] Help: Attempts to run specs quitting midstream

2008-10-30 Thread Scott Taylor
On Oct 30, 2008, at 8:21 PM, Evan Dorn wrote: I am having a very frustrating problem running specs on my current project. When I run tests en masse with "rake spec" or with autotest, it frequently quits without completing all the tests. It also sometimes runs the tests in multiple batches, g

[rspec-users] Help: Attempts to run specs quitting midstream

2008-10-30 Thread Evan Dorn
I am having a very frustrating problem running specs on my current project. When I run tests en masse with "rake spec" or with autotest, it frequently quits without completing all the tests. It also sometimes runs the tests in multiple batches, giving more than one result line for a single batch

Re: [rspec-users] help with webrat and selectors

2008-09-19 Thread Jonathan Linowes
nevermind, hpricot to the rescue :) On Sep 19, 2008, at 3:01 PM, Jonathan Linowes wrote: Hi, sorry if this isnt directly an rspec question but maybe someone can help lets say a page contains a list setup like this Item One Item Two Item Three in my story i want to refer to "first it

[rspec-users] help with webrat and selectors

2008-09-19 Thread Jonathan Linowes
Hi, sorry if this isnt directly an rspec question but maybe someone can help lets say a page contains a list setup like this Item One Item Two Item Three in my story i want to refer to "first item", "second item" and "last item" rather than by name What I'd like is to - get the n'th

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-17 Thread Matt Wynne
We just write a step that says 'Given I am logged in' which actually walks through the login process on the screens (fills_in :username etc). However you could have another step like 'Given authenication is disabled on the site' which does something dirty to your ApplicationController using

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-17 Thread aslak hellesoy
On Tue, Sep 9, 2008 at 2:33 AM, Eric Harris-Braun <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm hoping for a bit of help on best-practices for skipping a There are no practices for this (or anything else) that are better than any other practice. > before_filter when running a particular step. S

[rspec-users] help on skipping a before_filter for a story

2008-09-17 Thread Eric Harris-Braun
Hi folks, I'm hoping for a bit of help on best-practices for skipping a before_filter when running a particular step. Specifically the authentication filter. What happens is that the post (see code below) returns a redirect response to the login page triggered by the of my authentication filter,

[rspec-users] Help

2008-09-16 Thread Victor Asteinza
Sent from my iPhone. On Sep 16, 2008, at 18:11, [EMAIL PROTECTED] wrote: Send rspec-users mailing list submissions to [email protected] To subscribe or unsubscribe via the World Wide Web, visit http://rubyforge.org/mailman/listinfo/rspec-users or, via email, send a message with

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Ben Mabey
Eric Harris-Braun wrote: > Hi folks, > > I'm hoping for a bit of help on best-practices for skipping a > before_filter when running a particular step. Specifically the > authentication filter. What happens is that the post (see code below) > returns a redirect response to the login page triggered

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread David Chelimsky
On Mon, Sep 8, 2008 at 10:49 PM, Eric Harris-Braun <[EMAIL PROTECTED]> wrote: > Thanks David for the very detailed response. > > I see what you mean about why this should be hard to do. In fact > perhaps what I should do instead is simply specify the user-login part > in my story instead of skippi

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Eric Harris-Braun
Thanks David for the very detailed response. I see what you mean about why this should be hard to do. In fact perhaps what I should do instead is simply specify the user-login part in my story instead of skipping it. I didn't at first because its a pain, i.e. sending the sessions/create post and

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Jonathan Linowes
never mind, i misread your question, thought you were talking about a controller spec rather than a story stories are intended to exercise the full stack, so I actually log in, with a step like this: Given "I am logged in " do user = create_registered_user( :login => 'user', :password

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread David Chelimsky
On Mon, Sep 8, 2008 at 9:47 PM, Jonathan Linowes <[EMAIL PROTECTED]> wrote: > > On Sep 8, 2008, at 8:49 PM, Eric Harris-Braun wrote: > >> Hi folks, >> >> I'm hoping for a bit of help on best-practices for skipping a >> before_filter when running a particular step. Specifically the >> authenticatio

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Jonathan Linowes
On Sep 8, 2008, at 8:49 PM, Eric Harris-Braun wrote: Hi folks, I'm hoping for a bit of help on best-practices for skipping a before_filter when running a particular step. Specifically the authentication filter. What happens is that the post (see code below) returns a redirect response to the

Re: [rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread David Chelimsky
On Mon, Sep 8, 2008 at 7:49 PM, Eric Harris-Braun <[EMAIL PROTECTED]> wrote: > Hi folks, > > I'm hoping for a bit of help on best-practices for skipping a > before_filter when running a particular step. Specifically the > authentication filter. What happens is that the post (see code below) > ret

[rspec-users] help on skipping a before_filter for a story

2008-09-08 Thread Eric Harris-Braun
Hi folks, I'm hoping for a bit of help on best-practices for skipping a before_filter when running a particular step. Specifically the authentication filter. What happens is that the post (see code below) returns a redirect response to the login page triggered by the of my authentication filter,

Re: [rspec-users] [HELP] should receive :new but does not

2008-07-22 Thread Camilo Torres
thanks Maurício, I read your link. It worked. 2008/7/23 Maurício Linhares <[EMAIL PROTECTED]>: > The "should_receive" should appear before the "post :create" (look at > this for a better explanation -> > http://rubyforge.org/pipermail/rspec-users/2008-June/007342.html ) > > it 'shoul

Re: [rspec-users] [HELP] should receive :new but does not

2008-07-22 Thread Maurício Linhares
The "should_receive" should appear before the "post :create" (look at this for a better explanation -> http://rubyforge.org/pipermail/rspec-users/2008-June/007342.html ) it 'should not save the issue' do @issue = mock_model(Issue) @issue

[rspec-users] [HELP] should receive :new but does not

2008-07-22 Thread Camilo Torres
Hello, I am learning rspec/rspec-rails and ruby on rails. Controller: class IssuesController < ApplicationController def index end def new @issue = Issue.new end def create @issue = Issue.new

Re: [rspec-users] help with test design

2008-06-13 Thread David Chelimsky
Forwarded message from Chuck Remes: Begin forwarded message: From: Chuck Remes <[EMAIL PROTECTED]> Date: June 13, 2008 10:31:12 AM CDT To: rspec-users Subject: Re: [rspec-users] help with test design On Jun 11, 2008, at 2:25 PM, David Chelimsky wrote: On Jun 11, 2008, at 12:06 PM,

Re: [rspec-users] help with test design

2008-06-11 Thread David Chelimsky
On Jun 11, 2008, at 12:06 PM, Chuck Remes wrote: I'm having trouble figuring out how to drive the design of a class. I'm hoping I can get a hint or two from the more experienced BDDers on this list. I'm writing an adapter class that sits between a 3rd party library and my business logic.

Re: [rspec-users] help with test design

2008-06-11 Thread Pat Maddox
On Wed, Jun 11, 2008 at 10:06 AM, Chuck Remes <[EMAIL PROTECTED]> wrote: > Ideally, all of these steps would be private to the Adapter class and would > expose a single public interface called #build. All of these public methods > exist solely so I can test these specific behaviors. > > Any suggest

[rspec-users] help with test design

2008-06-11 Thread Chuck Remes
I'm having trouble figuring out how to drive the design of a class. I'm hoping I can get a hint or two from the more experienced BDDers on this list. I'm writing an adapter class that sits between a 3rd party library and my business logic. I would like to extract some information from obj

Re: [rspec-users] Help with Writing Meaningful Specs

2008-05-27 Thread Ashley Moran
On 27 May 2008, at 12:44, andypearson wrote: def self.cache_all feeds = self.find(:all) for feed in feeds xml = REXML::Document.new Net::HTTP.get(URI.parse(feed.url)) xml.elements.each '//item' do |item| Item.prepare_and_save(feed, item) end end end Problems are now beginning

Re: [rspec-users] Help with Writing Meaningful Specs

2008-05-27 Thread Tom Stuart
On 27 May 2008, at 12:44, andypearson wrote: xml = REXML::Document.new Net::HTTP.get(URI.parse(feed.url)) It won't make the problem go away, but you can certainly reduce the blizzard of intermediate stubs by pulling this chain out into its own method (e.g. fetch_xml_from_url) and stubbin

[rspec-users] Help with Writing Meaningful Specs

2008-05-27 Thread andypearson
Hello all, In yet another attempt to learn Ruby on Rails and Rspec I have started writing a simple life streaming app with will aggregate feeds from several places and save them in a database for later use. An internet search eventually led me to the following method for looping through the feed

Re: [rspec-users] Help needed

2008-05-18 Thread Ashley Moran
On 18 May 2008, at 18:28, Jens Carroll wrote: I was not aware that "@xml_import.user.country.should equal(@country)" is already a trainwreck. I think I have even longer ones - refactoring might be the magic word for my code now. Well I guess it's more the wrong sort of leaves on the line

Re: [rspec-users] Help needed

2008-05-18 Thread Jens Carroll
Jarkko Laine schrieb: Hi Jens, On 17.5.2008, at 20.34, Jens Carroll wrote: Hi All, I am new to rspec and it seems that I don't understand some basics. I need to have a XML import which should parse through XML data and saves all that in various mysql tables. The XML part works just fine and I

Re: [rspec-users] Help needed

2008-05-18 Thread Jens Carroll
Ashley Moran schrieb: On 17 May 2008, at 18:34, Jens Carroll wrote: Hi All, I am new to rspec and it seems that I don't understand some basics. Hi Jens, Jarkko answered your real question but there are other things worth pointing out, more about style than actually making the specs work.

Re: [rspec-users] Help needed

2008-05-18 Thread Ashley Moran
On 17 May 2008, at 18:34, Jens Carroll wrote: Hi All, I am new to rspec and it seems that I don't understand some basics. Hi Jens, Jarkko answered your real question but there are other things worth pointing out, more about style than actually making the specs work. spec --- m

Re: [rspec-users] Help needed

2008-05-17 Thread Jarkko Laine
Hi Jens, On 17.5.2008, at 20.34, Jens Carroll wrote: Hi All, I am new to rspec and it seems that I don't understand some basics. I need to have a XML import which should parse through XML data and saves all that in various mysql tables. The XML part works just fine and I can test this with rsp

  1   2   >