Re: [rspec-users] Webrat or RSpec and Table Headers

2010-12-28 Thread Jonathan Linowes
On Dec 29, 2010, at 1:14 AM, Shea Levy wrote: > Hi all, > > Suppose I have a table that lists all of my products, that includes a a > Description somewhere in the first , and each product has its > data held within a . After updating a > product's description, I want to write something like:

[rspec-users] nested examples in html formatter

2010-12-13 Thread Jonathan Linowes
Is there a way for the html formatter to show nested "describe" blocks, as written in my examples. Or perhaps I should change how I write my examples so nesting can be shown? eg describe MyModel do it "should be valid" describe "something" do it "should do this c

Re: [rspec-users] rspec-2.2 is released!

2010-11-28 Thread Jonathan Linowes
overflow in any spec when method_missing was invoked > * Add gem dependency on rails ~> 3.0.0 (ensures bundler won't install >rspec-rails-2 with rails-2 apps). > > ___ > rspec-users mailing list > rspec-users@rubyforge.org > http://rubyforge.org/mailman/listi

Re: [rspec-users] How do I generate specs for existing controllers?

2010-11-25 Thread Jonathan Linowes
rails hides them? why? On Nov 25, 2010, at 9:20 AM, David Chelimsky wrote: > On Nov 20, 2010, at 7:07 PM, Volkan Unsal wrote: > >> I want to generate boilerplate code for existing controller, models >> and views. Is there a command or a gem that lets me do that? > > You can't see them because

[rspec-users] turning on observers

2009-09-16 Thread Jonathan Linowes
hi, I'm trying to run specs for an observer thats included with a plugin. There's no guarantee the app has set the observer in its environment.rb. I'm presently doing this but expect there's a more elegant solution unless ActiveRecord::Base.observers.include? :subscription_observer puts

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

2009-07-20 Thread Jonathan Linowes
On Jul 20, 2009, at 6:58 PM, David Chelimsky wrote: So for me this is not an either/or question. Each underlying component has a responsibility, and the result of the three components doing the right thing adds up to the application behaving correctly. I'd also add that, for me, the cucumber

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] rspec-rails fails to find a controller name

2009-04-24 Thread Jonathan Linowes
I assume you tried it with the 3 lines (including get :index) uncommented On Apr 24, 2009, at 1:32 PM, wrote: Hi, I have a problem that seems a bit strange. No matter how I specify the controller name in a rails controller rspec I am always presented with 'HostController Retrie

Re: [rspec-users] [Cucumber] Options in tables

2009-04-22 Thread Jonathan Linowes
I'm no mathematician, but perhaps there's some notation from set theory that could be helpful? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
the output would be weird, eg Then he should see pork selections if And he should see lamb selections if Y And he should see veal selections if On Apr 21, 2009, at 2:17 PM, Aaron VonderHaar wrote: I think the scenario outline is the way to go, but in your example it's not clear to

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
te: On Tue, Apr 21, 2009 at 7:32 PM, Jonathan Linowes mailto:jonat...@parkerhill.com>> wrote: > > On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: > >> What you really want is an examples table that is embedded in a step >> (different from a

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
On Apr 21, 2009, at 1:57 PM, Joseph Wilk wrote: What you really want is an examples table that is embedded in a step (different from a step table, maybe by keyword?) that causes the step to be run multiple times for each of the values. So rather than using placeholders we embedded a Exampl

Re: [rspec-users] [Cucumber] Tables

2009-04-21 Thread Jonathan Linowes
Without adding a new feature to Cucumber, I'd probably do Scenario Outline: Religious menus Given the customer is a "" When they ask for the menu Then they should be presented with "" Examples: | Religion | Meats | | Christian | Pork, Lamb, Veal | | Jewish|L

Re: [rspec-users] [rspec, rails] Restful Routes in controller specs

2009-03-11 Thread Jonathan Linowes
On Mar 11, 2009, at 4:30 AM, Andi Schacke wrote: Hi, how is it possible that I can use the restful routes helpers (e.g. new_user_path) in controller specs? I browsed the source code but I couldn't find the magic. I'm just curious and would appreciate any hint... thanks Andi __

Re: [rspec-users] How do you mock a local variable (#2) ?

2009-02-27 Thread Jonathan Linowes
if you moved the code that defines crits into a method then you could stub the method crits = define_crits then controller.stub!(:define_crits).and_return( { :name => 'Steve' }) On Feb 27, 2009, at 3:35 PM, MathLef wrote: Hi, I need help to spec a local variable in a controller. I have be

Re: [rspec-users] [Cucumber] Level of features / Feature dependent steps

2009-02-17 Thread Jonathan Linowes
On Feb 17, 2009, at 3:27 PM, Lenny Marks wrote: Forgive the long post, just looking for input/advice/alternate opinions.. Like many I think that going through the exercise of framing user requests in Cucumber terms(Features, Scenarios..) really helps facilitate necessary conversations an

Re: [rspec-users] [RSpec] Cannot save or be_valid when using xss_terminate

2009-02-02 Thread Jonathan Linowes
On Feb 2, 2009, at 11:30 AM, Fernando Perez wrote: Hi, I have a Rails app that uses xss_terminate to sanitize the user input before it gets saved to the DB. In my specs when I call @product.should be_valid or @product.save, I get the following error message: -- NoMethodError in 'Creating a

Re: [rspec-users] OK... What is ... fu ?

2009-01-31 Thread Jonathan Linowes
And of course, when spelled out, F-U, has a whole different meaning... On Jan 30, 2009, at 11:27 PM, doug livesey wrote: And of course the pinnacle of geekdom is to be known as a 'poodle', or one who is skilled in being skilled; a fu-fu. Damn', I appear to be posting drunk again ... 2009/1/3

Re: [rspec-users] nokogiri selector help

2009-01-30 Thread Jonathan Linowes
On Jan 25, 2009, at 11:58 AM, Zach Dennis wrote: On Sat, Jan 24, 2009 at 12:05 AM, Jonathan Linowes wrote: hiya, i want the selector that would return a of a table if any td contains some text, so i can use it in click_link_within e.g. When I click the "show" link with

Re: [rspec-users] [Cucumber, BDD] When not to use Cucumber?

2009-01-24 Thread Jonathan Linowes
Hi, I've been using cucumber, and story runner before that since plain text stories were introduced 1.5 years ago. I also use rspec for model and controller specing/testing. I'll answer the opposite question: when do I use cucumber? I am a team of one, and I am my own client, so the way I

[rspec-users] nokogiri selector help

2009-01-23 Thread Jonathan Linowes
hiya, i want the selector that would return a of a table if any td contains some text, so i can use it in click_link_within e.g. When I click the "show" link within the row containing "u...@example.com" When /^I click the "(.+)" link within the row containing "(.+)"$/ do | link, text|

Re: [rspec-users] App can't start on production server due to RSpec missing

2009-01-18 Thread Jonathan Linowes
On Jan 17, 2009, at 2:14 PM, Mark Wilden wrote: On Sat, Jan 17, 2009 at 5:42 AM, Jonathan Linowes wrote: On Jan 16, 2009, at 4:15 PM, Fernando Perez wrote: I run rspec on my dev machine, but obviously not on my production machine, what would be the nicest way to handle such scenario? At

Re: [rspec-users] App can't start on production server due to RSpec missing

2009-01-17 Thread Jonathan Linowes
On Jan 16, 2009, at 4:15 PM, Fernando Perez wrote: I run rspec on my dev machine, but obviously not on my production machine, what would be the nicest way to handle such scenario? At the Actually, I run specs on my production machine, cap deploy:spec :) since its a different platform from m

Re: [rspec-users] Childrens book

2009-01-14 Thread Jonathan Linowes
On Jan 14, 2009, at 7:36 PM, aslak hellesoy wrote: That's soo my new signature :-) or, favicon.ico___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing Sub-domains with Cucumber

2009-01-14 Thread Jonathan Linowes
On Jan 14, 2009, at 11:39 AM, Tom Hoen wrote: Jonathan Linowes wrote: I do: host! "#{account.to_param}.example.com" --linoj linoj - thanks for the info. Where do you put this? -- Posted via http://www.ruby-forum.com/. ___ rspec-use

Re: [rspec-users] Testing Sub-domains with Cucumber

2009-01-14 Thread Jonathan Linowes
On Jan 13, 2009, at 8:46 PM, Tom Hoen wrote: My site uses sub-domains to create a context for the user. In my tests, I need to stipulate what domain is being used, to test whether the context is correct for the given user. But I cannot find if and where i can change the request.host value, i

Re: [rspec-users] how to check for empty field value?

2008-12-30 Thread Jonathan Linowes
I'll try that, but by the method name, I assume it looks for a tag for the field rather than the name attribute of the ? On Dec 30, 2008, at 12:56 AM, Josh Knowles wrote: On Mon, Dec 29, 2008 at 10:59 PM, Jonathan Linowes wrote: # Then /^the email_confirmation field should be cl

[rspec-users] how to check for empty field value?

2008-12-29 Thread Jonathan Linowes
# Then /^the email_confirmation field should be cleared$/ do # #how to write this # #selector( "input[name=user[email_confirmation]")[:value].should be_blank # end ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/m

Re: [rspec-users] regex help

2008-12-29 Thread Jonathan Linowes
rote: On Sun, Dec 28, 2008 at 11:59 PM, Jonathan Linowes wrote: Perhaps tell it to ignore any matches with " item" in it, but dont know how It's called a zero-width negative lookahead, and it looks like this: /^the (?!\w+ item)(.*) should have a \<(.*)\> tag with "(

[rspec-users] regex help

2008-12-28 Thread Jonathan Linowes
Hi, Could someone help me resolve this conflict: Then the selected item should have a tag with "Foo:" Multiple step definitions match "the selected item should have a tag with \"Foo:\"": (Cucumber::Multiple) features/step_definitions/page_builder_steps.rb:355:in `/^the (selected|fi

Re: [rspec-users] cucumber fit step table output

2008-12-28 Thread Jonathan Linowes
:09 AM, Jonathan Linowes wrote: If this is a bug I'll submit a ticket. Or, maybe I'd doing something wrong. Using a Cucumber FIT Step Table, the scenario runs and passes (and fails when i put bad data in the table). But the console output only shows the Step text, not the table so w

[rspec-users] cucumber fit step table output

2008-12-28 Thread Jonathan Linowes
If this is a bug I'll submit a ticket. Or, maybe I'd doing something wrong. Using a Cucumber FIT Step Table, the scenario runs and passes (and fails when i put bad data in the table). But the console output only shows the Step text, not the table so when I read the output it's not telling m

Re: [rspec-users] [ANN] Cucumber 0.1.13

2008-12-24 Thread Jonathan Linowes
I've been putting step helper methods in the same file as the step definitions. Do you think I should split them into separate support files? On Dec 24, 2008, at 6:10 AM, aslak hellesoy wrote: What's this about support/* files? Is there some convention emerging around structuring the feat

Re: [rspec-users] [Cucumber] factor out non-user steps

2008-12-16 Thread Jonathan Linowes
On Dec 16, 2008, at 6:50 AM, aidy lewis wrote: Hi, I have a step that has been defined by the user Given /a logged in user/ {} Now in that step I have my own step (not defined by the business) of Given "all projects have been deleted" The second step needs to be included in the first Giv

Re: [rspec-users] Stories, permissions, authorization rules etc.

2008-12-09 Thread Jonathan Linowes
I usually assume my scenario user has been Given permission and instead, I do the authorization testing in the controller specs with shared behaviors, for example, it_should_behave_like "a login required action" it_should_behave_like "a manager authorized action" That said, I also might have

Re: [rspec-users] Dreading Controller Specs

2008-10-28 Thread Jonathan Linowes
On Oct 22, 2008, at 4:32 PM, Pat Maddox wrote: I think any app with a rich domain model benefits from a service layer that uses that model. When building Rails apps, stuff is relatively simple and the controllers *are* the service layer. That's how I think of it, anyway. Most of the time

Re: [rspec-users] webrat within selector

2008-10-13 Thread Jonathan Linowes
pports it in a few ways for cases where it's needed. -Bryan On Mon, Oct 13, 2008 at 3:36 PM, Scott Taylor <[EMAIL PROTECTED]> wrote: On Oct 13, 2008, at 1:54 PM, Jonathan Linowes wrote: anyone know if/how webrat can scope a clicks_link within a selector? eg, if I have more than on

[rspec-users] webrat within selector

2008-10-13 Thread Jonathan Linowes
anyone know if/how webrat can scope a clicks_link within a selector? eg, if I have more than one "Foo" link on a page, I want to make sure I click the one within a specific div Tia linoj ___ rspec-users mailing list rspec-users@rubyforge.org http:

Re: [rspec-users] rake spec defaults to devel env

2008-09-26 Thread Jonathan Linowes
On Sep 26, 2008, at 1:36 PM, Tero Tilus wrote: I was experiencing the weirdest behavior (rake spec running fine without a test database) the other day. Turned out that actually rake spec was (and has been for heavens know how long for me) running in development environment. However script/spec

Re: [rspec-users] BDD / cucumber thought - chaining 'Then' steps with Which

2008-09-26 Thread Jonathan Linowes
On Sep 26, 2008, at 9:06 AM, Matt Wynne wrote: FWIW, I think it's rather nice. We went through a fad of using @it for a while, and now we have a stuff[] hash. Both similar ideas - there must be something in this. I'm doing the same thing. I had @current_project, @current_page etc ( htt

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 "

[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] workflow: user => stories/features => spec => code => user

2008-09-19 Thread Jonathan Linowes
sometimes i do story => code => spec => (re)code => story step => (re)code => spec => (re)code or whatever, but hey, thats just me... :) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Cucumber Scenario syntax

2008-09-17 Thread Jonathan Linowes
On Sep 12, 2008, at 4:01 PM, Joseph Wilk wrote: Evan David Light wrote: On Sep 12, 2008, at 12:26 PM, David Chelimsky wrote: I believe that binding the table to the phrasing would be immensely useful and perhaps even crucial to Scenario authors. Can you give an example of how this wo

Re: [rspec-users] w3 validation

2008-09-16 Thread Jonathan Linowes
On Sep 15, 2008, at 6:16 PM, Zach Dennis wrote: On Mon, Sep 15, 2008 at 5:32 PM, Jonathan Linowes <[EMAIL PROTECTED]> wrote: Hi, suggestions how to add w3 validation to a story step? eg Then the page should be valid You could write a "then" step that takes the current respon

[rspec-users] w3 validation

2008-09-15 Thread Jonathan Linowes
Hi, suggestions how to add w3 validation to a story step? eg Then the page should be valid tia linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] form_for url

2008-09-12 Thread Jonathan Linowes
hi, I'm specing a view that contains <% form_for @page, :url => { :action => :update },... and get the error No route matches {:action=>"update"} In the spec, I've tried several things, including it "should work" do assigns[:page] = mock_model(Page) request.env["HTTP_REFERER"] = "/pa

Re: [rspec-users] Best practices for sharing state between story steps?

2008-09-10 Thread Jonathan Linowes
of course, there's one 'global' shared between steps that we cant live without: response :) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2008-09-08 Thread Jonathan Linowes
n => 'user', :password => 'secret') post_via_redirect "/sessions", :login => 'user', :password => "secret", response.should be_success session[:user].should == user.id end On Sep 8, 2008, at 10:47 PM, Jonathan Linowes wrote:

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] scenarios on production data

2008-09-08 Thread Jonathan Linowes
On Sep 8, 2008, at 12:35 PM, Dan North wrote: 2008/9/8 Jonathan Linowes <[EMAIL PROTECTED]> On 4 Sep 2008, at 18:55, Jonathan Linowes wrote: I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production data

Re: [rspec-users] scenarios on production data

2008-09-08 Thread Jonathan Linowes
On 4 Sep 2008, at 18:55, Jonathan Linowes wrote: I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production database, as an alternative to normal use. Not sure how that'd work, maybe replace the Given's but le

Re: [rspec-users] Best practices for sharing state between story steps?

2008-09-08 Thread Jonathan Linowes
On Sep 7, 2008, at 7:58 PM, Sam Stokes wrote: What approaches do people use to achieve this? Perhaps I'm bucking what others have advised against, so take it for what it's worth. I make some limited use of global (instance) variables that correspond to english language pronouns. I have

Re: [rspec-users] 2nd attempt at mocking and stubbing

2008-09-05 Thread Jonathan Linowes
On Sep 5, 2008, at 5:44 PM, Nick Hoffman wrote: Property.stub!(:find).and_return mock_property1, mock_property2 try Property.stub!(:find).and_return( [mock_property1, mock_property2] ) Want to help others? Become a certified physic

Re: [rspec-users] scenarios on production data

2008-09-05 Thread Jonathan Linowes
On Sep 5, 2008, at 1:27 PM, Mark Wilden wrote: On Fri, Sep 5, 2008 at 9:11 AM, Jonathan Linowes <[EMAIL PROTECTED]> wrote: That is, if my stories run with my well controlled, relatively small setups, I'd like to ensure they run on a large, fully populated, somewhat 'ran

Re: [rspec-users] scenarios on production data

2008-09-05 Thread Jonathan Linowes
On Sep 5, 2008, at 11:50 AM, Ashley Moran wrote: On 4 Sep 2008, at 18:55, Jonathan Linowes wrote: I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production database, as an alternative to normal use. Not sure how t

[rspec-users] scenarios on production data

2008-09-04 Thread Jonathan Linowes
I'm just thinking out loud here... It could be useful to have a way to run scenarios on a copy of a fully populated production database, as an alternative to normal use. Not sure how that'd work, maybe replace the Given's but leave the Whens and Thens? linoj

Re: [rspec-users] specifying a controller's layout

2008-09-04 Thread Jonathan Linowes
noting my own typo def negeative_failure_message should be def negative_failure_message :) On Sep 4, 2008, at 10:24 AM, Matt Wynne wrote: Thanks David. I really struggled to get that to catch anything. My colleague Dan found this, which is working well for me: http://rubyfo

Re: [rspec-users] Setting instance variables for controllers

2008-09-03 Thread Jonathan Linowes
On Sep 3, 2008, at 10:53 AM, Scott Taylor wrote: On Sep 3, 2008, at 10:40 AM, Maurício Linhares wrote: You don't need to set the instance variable, you can stub the find call: Or you could also stub the call to User::find. Also - you don't *WANT* to set the instance variable - it's an

Re: [rspec-users] opening a response in browser (webrat)

2008-09-01 Thread Jonathan Linowes
e done this... File.open(RAILS_ROOT + "/public/duh.html", "w"){ |f| f.puts response.body } And then in terminal I go to my project root and type "open public/duh.html". Although you may be able to get away with doing this in your debugging session: system "

[rspec-users] opening a response in browser (webrat)

2008-09-01 Thread Jonathan Linowes
Given I am running an rspec story And it uses webrat And I am using rdebug When I am at a breakpoint (eg after a 'visits' in a step) Then how can I open the current response in a browser to see what the page actually looks like at that point? ___

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-31 Thread Jonathan Linowes
On Aug 31, 2008, at 9:39 AM, David Chelimsky wrote: Agreed. Stories and/or Features seem to be more about organization and communication. Scenarios drive code development. +1 I also like to organize them into workflows, tasks, goals Which makes me think maybe the scenario should be a more ind

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-31 Thread Jonathan Linowes
On Aug 31, 2008, at 7:56 AM, Matt Wynne wrote: On 30 Aug 2008, at 19:31, Scott Taylor wrote: On Aug 30, 2008, at 2:12 PM, Tero Tilus wrote: 2008-08-30 17:02, Matt Wynne: RuBehave Now _that's_ cool! I love it! Personally, I always liked the rbehave / rspec combo, of Mike Myers & Ali

Re: [rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
On Aug 29, 2008, at 1:58 PM, Christopher Bailey wrote: I too would suggest trying attaches_file. I use it in a few different stories I have, and it works fine for me. I don't believe I'm doing anything nonstandard. Here's the basics of what yep, works for me :) thx__

Re: [rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
On Aug 29, 2008, at 1:19 PM, Jonathan Linowes wrote: i am trying that too, but at this point in my story i dont actually have the current record object to generate the form action path. How would i extract the :action = path from the in the current response.body ? got it #assuming

Re: [rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
On Aug 29, 2008, at 12:52 PM, Ben Mabey wrote: Jonathan Linowes wrote: I've read through the messages on this list, and have file upload specs working in my model and controller tests, using :file => ActionController::TestUploadedFile.new(filepath) But its not working in stories usin

[rspec-users] uploads with webrat in stories

2008-08-29 Thread Jonathan Linowes
I've read through the messages on this list, and have file upload specs working in my model and controller tests, using :file => ActionController::TestUploadedFile.new(filepath) But its not working in stories using webrat. I've tried fills_in "foo[file]", :with => filepath and fills

Re: [rspec-users] How much test data to use in specs

2008-08-27 Thread Jonathan Linowes
what if my office were at Route 102 & Yahoo! Way, Suite #123 :) On Aug 27, 2008, at 2:03 PM, Nick Hoffman wrote: On 2008-08-27, at 12:57, Rahoul Baruah wrote: For this, trivial, example, I find that far too verbose. The "specification" says "if it is less than 2 characters then i

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-25 Thread Jonathan Linowes
On Aug 25, 2008, at 11:19 AM, aslak hellesoy wrote: On Mon, Aug 25, 2008 at 5:12 PM, Jonathan Linowes <[EMAIL PROTECTED]> wrote: On Aug 24, 2008, at 12:31 PM, David Chelimsky wrote: In terms of the feature (which is the report), I see this as just another scenario. In terms of d

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-25 Thread Jonathan Linowes
On Aug 24, 2008, at 12:31 PM, David Chelimsky wrote: In terms of the feature (which is the report), I see this as just another scenario. In terms of driving development and estimating effort, I see this as a new User Story. Does this clarify or further confuse? I see your scenario of 499

Re: [rspec-users] OT 'parts'

2008-08-25 Thread Jonathan Linowes
On Aug 24, 2008, at 4:18 PM, Jay Levitt wrote: David Chelimsky wrote: Agreed. Tools is tools. Process is process. (boat is boat ) And parts is parts. Let's not forget that: http://www.youtube.com/watch?v=OTzLVIc-O5E Jay OT, reminds me of when, a while back, I was developing CAD sof

Re: [rspec-users] story vs feature (was Documentation for Plain-Text Stories)

2008-08-22 Thread Jonathan Linowes
On Aug 20, 2008, at 10:20 AM, David Chelimsky wrote: I see them as very different. User Stories are inputs to a development process and Features are the outputs. I decided to churn on this for a few days before responding. Actually I was going to let it drop, but kept thinking about it.

Re: [rspec-users] Documentation for Plain-Text Stories

2008-08-20 Thread Jonathan Linowes
On Aug 20, 2008, at 2:20 AM, Aslak Hellesøy wrote: (In Cucumber it's Feature, not Story) no offense, but while you're being picky about names, I dont see too much difference between 'story' and 'feature' but 'cucumber' is a really random meaningless name _

Re: [rspec-users] rake spec loads development environment

2008-08-19 Thread Jonathan Linowes
On Aug 19, 2008, at 5:08 PM, Jonathan Linowes wrote: On Aug 19, 2008, at 4:32 PM, Satish Gunnu wrote: Yes I think that is what's happening in my case. is this how it is supposed to work? or can we have rspec ignore the step to look at development environment. thanks so much for all

Re: [rspec-users] rake spec loads development environment

2008-08-19 Thread Jonathan Linowes
On Aug 19, 2008, at 4:32 PM, Satish Gunnu wrote: Yes I think that is what's happening in my case. is this how it is supposed to work? or can we have rspec ignore the step to look at development environment. thanks so much for all your help. you'll notice that vendor/plugins/rspec-rails/rspec.

Re: [rspec-users] rake spec loads development environment

2008-08-19 Thread Jonathan Linowes
On Aug 19, 2008, at 2:05 PM, Satish Gunnu wrote: Hi, I am new to rspec and started implementing it on my project yesterday. I have followed the instructions and installed rspec gem and rspec plugin into my project. I created couple of sample stories and tried running the specs using spec

[rspec-users] how many scenarios

2008-08-15 Thread Jonathan Linowes
Hi, at the risk of posing an insignificant question, I'm curious how many Scenarios you are putting into a given Story file? How many would you consider 'alot'? 'too much'? and why? ___ rspec-users mailing list rspec-users@rubyforge.org http://ruby

Re: [rspec-users] problem with get and post methods.. require missing ?

2008-08-14 Thread Jonathan Linowes
and, is it SetupController or SetupsController ? On Aug 14, 2008, at 1:47 PM, David Chelimsky wrote: On Thu, Aug 14, 2008 at 12:42 PM, <[EMAIL PROTECTED]> wrote: Hello, I got an error when I run my spec test of a controlleur : the get and post methodes are unknown. here is my test file :

Re: [rspec-users] How do you stub out callbacks?

2008-08-14 Thread Jonathan Linowes
Don't stub out callbacks, rather spec the behavior of the model, which might mean stubbing out methods (in a different model?) called by the callback. On Aug 14, 2008, at 9:53 AM, Rob Lacey wrote: Hi there, I'm trying to write a spec for and existing model. It has an after_create callba

Re: [rspec-users] passing a hash in stories

2008-08-08 Thread Jonathan Linowes
view, etc On Aug 8, 2008, at 1:43 PM, Ben Mabey wrote: Jonathan Linowes wrote: Hi, Anyone have code you could share that lets you pass a hash in plain text stories, for example Then I fill out form with name: Jon, email: [EMAIL PROTECTED], age: 9 passes in a hash { 'name' => &

[rspec-users] passing a hash in stories

2008-08-08 Thread Jonathan Linowes
Hi, Anyone have code you could share that lets you pass a hash in plain text stories, for example Then I fill out form with name: Jon, email: [EMAIL PROTECTED], age: 9 passes in a hash { 'name' => 'Jon', 'emal' => '[EMAIL PROTECTED]', 'age' => '9' } __

Re: [rspec-users] Someone please name this matcher for me

2008-08-06 Thread Jonathan Linowes
.should be_bag_of( [1, 3, 1, 4, 2] ) On Aug 6, 2008, at 2:33 PM, Steve Schafer wrote: On Wed, 6 Aug 2008 13:50:27 -0400, you wrote: I've had a matcher in my head for a couple months, that I frequently want but never get around to writing because I can't think of the name for it. Here's ho

Re: [rspec-users] Someone please name this matcher for me

2008-08-06 Thread Jonathan Linowes
perhaps verbose but how about foo.should equal_in_any_order [1, 3, 1, 4, 2] On Aug 6, 2008, at 1:50 PM, Pat Maddox wrote: I've had a matcher in my head for a couple months, that I frequently want but never get around to writing because I can't think of the name for it. Here's how it

Re: [rspec-users] [ANN/ADV] "Scripted GUI Testing With Ruby" book (uses RSpec)

2008-08-06 Thread Jonathan Linowes
Ian, sounds like your espresso machine needs some gui testing... :) On Aug 6, 2008, at 12:47 AM, Ian Dees wrote: Hi, all. The publishers have just thrown the switch to make my new book, "Scripted GUI Testing With Ruby," available for purchase in both PDF and "analog." http://www.pragprog.com/

[rspec-users] test log

2008-05-16 Thread Jonathan Linowes
Is there an easy way to inject each example text into test.log so I can isolate the log output per example? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Testing that named_scope is defined

2008-05-13 Thread Jonathan Linowes
On May 13, 2008, at 6:39 PM, Helder Ribeiro wrote: I'm not actually trying to test its behavior, quick! Duck! INCOMING...! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] BDD/Rails/Shoulda

2008-04-24 Thread Jonathan Linowes
I'm not sure this answers your questions, but you prompted me to share my experience. Personally i consider BDD just one tool in my toolbox. And I consider rspec to be as much a testing tool as a (BD)Development one. So I often find myself just taking the path of least resistance. And ite

Re: [rspec-users] Has anyone pulled from the repo recently, but not on/after 4/16?

2008-04-16 Thread Jonathan Linowes
You might try here http://www.google.com.au/intl/en/gday/index.html Jonathan On Apr 16, 2008, at 3:23 PM, Pat Maddox wrote: > Actually, if you updated the repo after 4/16, please send it to me. > Also include any winning lotto numbers for the date of your last pull. > In fact, screw the repo, I

Re: [rspec-users] spec'ing models

2008-03-31 Thread Jonathan Linowes
for associations, among other things, i've been using http://rspec-on- rails-matchers.googlecode.com/svn/trunk/README linoj On Mar 31, 2008, at 8:33 PM, Anthony Broad-Crawford wrote: I have been using the following approach. Looking forward to see if anyone else does something better to te

Re: [rspec-users] rescue

2008-03-18 Thread Jonathan Linowes
yep, that did it :) thx On Mar 18, 2008, at 11:50 PM, Zach Dennis wrote: > On Tue, Mar 18, 2008 at 11:13 PM, linojon <[EMAIL PROTECTED]> wrote: >> Hi, whats the correct way to spec a rescue? This will raise it but >> doesnt >> test my code's response >> >> >> >> # controller >> >> def edit >

Re: [rspec-users] Problems with form_for and partials

2008-03-14 Thread Jonathan Linowes
seems like it'd make sense to just add this to http://code.google.com/ p/rspec-on-rails-matchers/ linoj On Mar 14, 2008, at 8:48 AM, Brandon Keepers wrote: Zach, On 3/14/08, Zach Moazeni <[EMAIL PROTECTED]> wrote: This hints at another extension I've wanted to write for us for a while. C

Re: [rspec-users] Problems with form_for and partials

2008-03-13 Thread Jonathan Linowes
t this way instead of passing the form builder around, anyone? On Mar 13, 2008, at 5:05 AM, David Chelimsky wrote: > On Wed, Mar 12, 2008 at 10:19 PM, Jonathan Linowes > <[EMAIL PROTECTED]> wrote: >> >> On Mar 12, 2008, at 5:47 PM, David Chelimsky wrote: >> >>

Re: [rspec-users] Problems with form_for and partials

2008-03-12 Thread Jonathan Linowes
On Mar 12, 2008, at 5:47 PM, David Chelimsky wrote: > On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis > <[EMAIL PROTECTED]> wrote: >> You can use mocha parameter matching to match on "anything" where >> your >> form builder would be passed in. You could also use Mocha's >> "kind_of" >> param

Re: [rspec-users] Problems with form_for and partials

2008-03-12 Thread Jonathan Linowes
Has anyone come up with a solution for stubbing partials and passing form builders to it? i have a complex form with many parts, and those are rendered in partials On Oct 21, 2007, at 8:46 AM, rupert wrote: >> i'm having problem with a form_for situation where i'm trying to DRY >> out the re

[rspec-users] view spec on rails questions

2008-03-10 Thread Jonathan Linowes
Hi I have a couple of questions 1) how do you test the response inside a content_for block I see reference to it in the release notes but dont know where to find it (tried http://rspec.info/rdoc-rails/ ) 2) I dont seem to be able to stub partials in a different directory eg <%= render :

Re: [rspec-users] route_for and nested resources

2008-01-27 Thread Jonathan Linowes
Note, named routes cannot be accessed unless you have a response (eg after you've run a controller action) See http://rspec.lighthouseapp.com/projects/5645/tickets/201-enable- named-urls-before-response On Jan 27, 2008, at 8:26 PM, Matt Darby wrote: On Jan 27, 2008, at 8:05 PM, David Chelim

Re: [rspec-users] sharing specs in a subclass

2008-01-22 Thread Jonathan Linowes
cool thx :) On Jan 23, 2008, at 12:02 AM, David Chelimsky wrote: > On Jan 22, 2008 10:49 PM, Jonathan Linowes > <[EMAIL PROTECTED]> wrote: >> Hi >> >> I've spec'd a class and they pass. >> >> Now I'd like to assure that any sub

[rspec-users] sharing specs in a subclass

2008-01-22 Thread Jonathan Linowes
Hi I've spec'd a class and they pass. Now I'd like to assure that any subclass of this class also passes the same specs. Any suggestions for a clever way to handle this? I'd prefer to keep the existing specs as is (eg instead of moving everything into shared behaviors, or doing something to a

Re: [rspec-users] RSpec stories introduction

2008-01-15 Thread Jonathan Linowes
similarly, here's my write up: http://www.vaporbase.com/postings/Getting_Started_with_Story_Runner linoj On Jan 15, 2008, at 8:18 PM, James Byrne wrote: > I can get to the RSpec list through ruby-forum. Yes! The things you > discover googling for help! > > I followed the advice to go to peepco

Re: [rspec-users] Varying test data

2008-01-11 Thread Jonathan Linowes
On Jan 11, 2008, at 5:50 AM, David Chelimsky wrote: > Apparently, Pat and I are twins separated at birth. Would it then be correct to refactor and eliminate one of them?? :)) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org

  1   2   >