Re: [rspec-users] rspec failure upon revisit

2012-11-06 Thread Lee Quarella
Looks like it " expected following output to contain a Sign up tag:" and the output's title tag is "Ruby on Rails Tutorial Sample App | ". I am pretty new to rspec and testing in general, but it looks like fixing the page title will make this test pass. On Tue, Nov 6, 2012 at 2:42 PM, Drew Davi

[rspec-users] rspec-rails setup in Rails 3

2010-09-13 Thread Lee Smith
I'm missing something in my setup of rspec-rails in a rails 3 project. I've included the link to the gist. It seems that it doesn't recognize rails routes for some reason...getting "undefined local variable or method". The spec file I'm running is sitting in spec/integration, if that matters. T

[rspec-users] How I make browser act-as-robot-driven ?

2010-05-19 Thread Audrey A Lee
Dear list, Today I am working through the simple tutorial here: http://wiki.github.com/aslakhellesoy/cucumber/ruby-on-rails It has me install Cucumber-Rails and then create a feature. Then I watch the feature fail when I run rake cucumber Then I watch the feature pass after I implement some c

Re: [rspec-users] Cucumber and IP PBX testing

2009-11-18 Thread Lee Hambley
Robertico, Provided you can match the items you need to click, select, fill in and alter with CSS (see assert_select: http://blog.labnotes.org/2006/09/04/assert_select-cheat-sheet/) selectors, you can do all of these things -- Lee Hambley Twitter: @leehambley | @capistranorb

Re: [rspec-users] [WEBSITE] runners.html page out of date

2009-11-06 Thread Lee Hambley
+1 -- Lee Hambley Twitter: @leehambley | @capistranorb Blog: http://lee.hambley.name/ Working with Rails: http://is.gd/1s5W1 2009/11/6 Tom Stuart > On 5 Nov 2009, at 11:59, Conrad Taylor wrote: > >> Hi, the following page needs to be updated to use spork instead of &g

Re: [rspec-users] Rspec Tutorial

2009-10-28 Thread Lee Hambley
David, great quick response, thanks - lets hope our action condenses the nonsense round here. -- Lee Hambley ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rspec Tutorial

2009-10-28 Thread Lee Hambley
Matt, Thats a good start, can I suggest adding it to the google group homepage, whoever has admin control? -- Lee Hambley Sent from my iPhone. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rspec Tutorial

2009-10-28 Thread Lee Hambley
but in our case (as most will agree) - we do indeed have a documentation problem. -- Lee Hambley Twitter: @leehambley | @capistranorb Blog: http://lee.hambley.name/ Working with Rails: http://is.gd/1s5W1 2009/10/28 Vishu Ramanathan > Lee's frustration is not groundless. In my few wee

Re: [rspec-users] Anyone using the rspec textmate bundle with Ruby 1.9.1

2009-10-23 Thread Lee Hambley
Rick, You could hack the TM_RUBY variable, or if you launch Texmtate from the command line, it will inherit that terminal's RUBY values (also $PATH, $ENV, etc) -- Lee Hambley Twitter: @leehambley | @capistranorb Blog: http://lee.hambley.name/ Working with Rails: http://is.gd/1s5W1 2009/

Re: [rspec-users] Rspec Tutorial

2009-10-23 Thread Lee Hambley
This topic is raised once a month by someone from India with no "search" skills - please check the list for similar questions. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] stub! and stubs

2009-10-13 Thread Lee Hambley
Sam, As the .any_instance call suggests, anything ever again for the duration of the test will stub that value, the alternative is this: Foo.any_instance.stubs(:valid?).returns(false) replace with this foo = Foo.new foo.stubs(:valid?).returns(false) HTH - Lee

Re: [rspec-users] should and != operator

2009-10-12 Thread Lee Hambley
Willy... Should you not use .should_not ? -- Lee ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] What argument should I pass for mock(), stub() and double()

2009-10-11 Thread Lee Hambley
John, I may well be wrong, but I believe it's just a `tag` or name, so when you print out - you see <#Double customer> rather tahn something inexplicable, that is at least how it appears to work using Mocha - Lee ___ rspec-users mailing

Re: [rspec-users] Cucumber step or model spec?

2009-07-20 Thread Lee Hambley
ve been writing this draft for so long, David C has also answered, I am as interested as you to read that, so HTH. -- Lee Hambley Twitter: @leehambley Blog: http://lee.hambley.name/ Working with Rails: http://is.gd/1s5W1 2009/7/20 Marcelo de Moraes Serpa > Hello list, > > I have an e

Re: [rspec-users] Can I set params in before[:each] block?

2009-06-12 Thread Lee
Makes perfect sense. Thanks for the tip Matt! On 12 June, 09:43, Matt Wynne wrote: > On 12 Jun 2009, at 08:34, Lee wrote: > > > > > In my controller's create method, I have: > > > @sub_context = @context.create_sub_context(params[:context][:name]) > > >

[rspec-users] Can I set params in before[:each] block?

2009-06-12 Thread Lee
In my controller's create method, I have: @sub_context = @context.create_sub_context(params[:context][:name]) If I do not specify params in the "post :create" call in my controller spec then I get the following error for each example: You have a nil object when you didn't expect it! You might ha

Re: [rspec-users] Driving Out A View - Am I specifying too much?

2009-06-05 Thread Lee
Thank you everyone for your helpful insights. I had already gone down the route suggested by Zach but it was nevertheless very re-assuring to have my approach validated as I am a newbie to RSpec. I did however consolidate my expectations e.g.: context "when the member is a privileged member of

Re: [rspec-users] Driving Out A View - Layouts and Sessions?

2009-06-05 Thread Lee
, "sub_menu" is defined in the helper file for the controller "contexts". How do I get the spec to "see" this file and its contents when executed? I think It's seeing "main_menu". Thanks. On 5 June, 17:39, Stephen Eley wrote: > On Fri, Jun 5, 200

[rspec-users] Driving Out A View - Am I specifying too much?

2009-06-05 Thread Lee
I am driving out a view that renders a list of items with which a logged in member is associated. Against each item, one or more links may be rendered according to the member's role with respect to the item (item owner, item administrator, regular user etc). Each link represents a type of function

[rspec-users] Driving Out A View - Layouts and Sessions?

2009-06-05 Thread Lee
I am driving out a view and I want to test that a link is displayed. The link_to code for the link is included in the layout for the view rather than the view template itself. Here's my example: it "should display a link to create a new zone" do render "contexts/index.html.erb", :layout =>

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

2009-05-27 Thread Lee Hambley
Scott, Last mondayish ? - Lee 2009/5/27 Scott Taylor > 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 als

Re: [rspec-users] When to stub_model?

2009-05-20 Thread Lee
> I can't remember if you can do that, to be honest. I think the hash of > parameters to stub_model is used to set up stubs on the object - so > they won't get passed to the constructor. Hopefully someone else on > the list should be able to tell you if this is possible. Matt, I have since looked

Re: [rspec-users] When to stub_model?

2009-05-20 Thread Lee
Thanks Matt. Very helpful. I have tried out stub_model. The constructor of one of my models (Namespace) requires a mandatory :name attribute to be provided. So when I try to stub_model it - e.g. representative_namespace = stub_model(Namespace) - I get the following spec error. 1) RuntimeError in

[rspec-users] When to stub_model?

2009-05-19 Thread Lee Longmore
I am trying to specify a controller with RSpec for the first time. I have been using mock_model to date but, given that the models are fully implemented, I am wondering if I should be using stub_model. Based on what I have read, I am struggling to understand the advantages that stub_model over

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] 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. > Becau

Re: [rspec-users] List Split

2009-05-18 Thread Lee Hambley
mel's back and prompted me to post this thread - Lee 2009/5/18 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 > > > __

Re: [rspec-users] List Split

2009-05-18 Thread Lee Hambley
are using the rspec+cucumber stack with MRI ruby, and a rails project, it doesn't get more mainstream for rspec and cucumber than that, but even so I find most of the rspec centric conversations on the list to be distracting and confusing. Considerately, - Lee 2009/5/18 Zach Dennis > On M

[rspec-users] List Split

2009-05-18 Thread Lee Hambley
ater today. The SNR ratio is absurd, and the list users should really consider a split. Thanks for the things I've learned, and the tips and tricks that I have been fortunate enough to pick up. - Lee ___ rspec-users mailing list rspec-user

[rspec-users] HowTo Specify A Method is Called Within A Controller's Action

2009-05-15 Thread Lee Longmore
o spec this expected behaviour? In particular, I can't work out how to specify that logged_in_member is called. Thanks, Lee. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Why won't my simple controller spec pass?

2009-05-15 Thread Lee
=> "fred"} > > And then in the controller 'create' method: > > Context.new params[:context] On 15 May, 07:28, Lee wrote: > I have been trying to spec a Rails Controller for the first time, > having just completed my first View spec. > > Having hit

[rspec-users] Why won't my simple controller spec pass?

2009-05-14 Thread Lee
I have been trying to spec a Rails Controller for the first time, having just completed my first View spec. Having hit a wall trying to spec a controller for my own application, I have tried to get an example in beta of The RSpec Book to work. I am however experiencing the same failures. I would a

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-13 Thread Lee
point of writing RSpec view specs. Some replies seem to suggest the use of Cucumber with Culerity/Webrat/ Selenium and I read into this that one would bypass view specs for the AJAX related steps and just write the necessary view code (e.g. JavaScript or Rails Prototype helpers) to get the step to p

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee
Thanks Matt. I have been trying out Cucumber and Culerity (Celerity) but rather than jump directly from Cucumber to coding the necessary views, controllers and models required for each scenario, I wanted to drive out the code using RSpec. So I've started to spec a view required by a scenario, and

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee
eventually run the e2e Cucumber scenarios. On May 12, 3:04 pm, Mike Doel wrote: > On May 12, 2009, at 8:36 AM, Lee Longmore wrote: > > > I am new to RSpec and have just started to drive out my first Rails   > > view using a spec. I have used the The RSpec Book (beta) to do the   &g

Re: [rspec-users] How To Drive Out AJAX Functionality in Rails' Views?

2009-05-12 Thread Lee
My apologies! I posted twice by accident. Please see my other post on this topic. On May 12, 1:31 pm, Lee wrote: > I am new to RSpec and have just started to drive out my first view > using a spec. I have used the The RSpec Book (beta) to do the basic > stuff like testing for the pres

Re: [rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee
Nokogiri. Is my understanding correct? Or is this your preferred approach but there are others? On May 12, 2:42 pm, Phlip wrote: > Lee Longmore wrote: > > I am new to RSpec and have just started to drive out my first Rails view > > using a spec. I have used the The RSpec Book (beta)

[rspec-users] How To Drive Out AJAX Functionality in Rails' Views?

2009-05-12 Thread Lee
I am new to RSpec and have just started to drive out my first view using a spec. I have used the The RSpec Book (beta) to do the basic stuff like testing for the presence of a field but I am unsure where to start for driving out some AJAX functionality. In the view, I will have a text field that a

[rspec-users] How To Drive Out AJAX Functionality in a Rails View

2009-05-12 Thread Lee Longmore
I am new to RSpec and have just started to drive out my first Rails view using a spec. I have used the The RSpec Book (beta) to do the basic stuff like testing for the presence of a field but I am unsure where to start for driving out some AJAX functionality. In the view, I will have a text fie

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

2009-05-05 Thread Lee Hambley
Hi List, We didn't resolve this in the end, we rolled back to Cucumber 0.3.0; has anyone else seen anything similar? - Lee 2009/4/30 Julian Leviston > I have NO idea if this is relevant, but the way you extend worlds has > changed, I'm fairly sure. > Julian. > > >

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

2009-05-02 Thread Lee Hambley
Hi Julian, You can do just that, the scenarios stack like that quite well, and it is reasonable to call a step from another, but you should have something like Scenario: Logging In Given there is a user When I visit the login page And I fill in username with ... And I fill in passowrd with ..

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

2009-04-30 Thread Lee Hambley
Hi Ben, Please see this Gist http://gist.github.com/104711 - note also that it doesn't seem to matter about the dependencies I've got in that file now, they're a recent addition and don't seem to affect this behavior. - Thanks, Lee 2009/4/30 Ben Mabey > Lee Ham

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

2009-04-30 Thread Lee Hambley
is goes away if we roll back to 0.3.0. - http://gist.github.com/104429 I also listed the relevant local gems as far as I can see, I'll post back here if I come up with anything, pointers or suggestions would be welcomed! Thank you, Lee Hambley ___

[rspec-users] Cucumber/RSpec for an existing Rails project - generate rspec models and controllers?

2009-04-25 Thread Lee Longmore
code base, how do I synch RSpec with these? That is, do I need to generate RSpec models and controllers for each of these existing models and controllers? If so, is there I anything I should be aware of when doing so? Many thanks, Lee. mobile: +44(0)775 392 8067 home: +44(0) 208 8358256

Re: [rspec-users] MockExpectationError

2008-12-05 Thread Song Lee
yes indeed, thanks -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] MockExpectationError

2008-12-05 Thread Song Lee
no matter how I try to stub! it still showing this error I have the following in my spec Profile.stub!(:new).and_return(@profile = mock_model(Profile)) Then (rdb:1) @profile.stub!(:user) #, @name="Pr ofile_1300">>, @args_expectation=#], @match_any_args=true>, @args_to_yield=[], @method_block

[rspec-users] user stories for load testing?

2008-05-13 Thread Rick Lee-Morlang
Hi all, We've recently been kicking around different ideas for simulating user behaviour for the purposes of load testing our backend. We hit on the idea of having user stories do double duty for both verifying behaviour and (if selected stories were driven en-masse by a distributed network o

Re: [rspec-users] autotest displays no output

2007-10-31 Thread Lee Irving
As you are on Windows can I suggest you try removing all of the options from your spec.opts file and try again. You need to do this with native windows but not sure about cygwin. Worth a try. On 10/31/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On Oct 31, 2007 9:30 AM, pangel <[EMAIL PROTE

Re: [rspec-users] "Not Implemented" doesn't show

2007-09-19 Thread Semin Lee
Andrew WC Brown wrote: > I'm going through Peepcode's Rspec Basics for an overview. > > He's just doing a simple spec: > > class PeepCode > end > > describe PeepCode do > it "should be awsome" do > end > end > > So running spec spec/simple_spec.rb should produce according to his > screen cast