[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] 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

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

[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] 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] 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] 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

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] 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] [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] [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

[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] 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] 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] 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] 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] 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

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

[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] [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

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] 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] [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] [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] 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] [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] [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] [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
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
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] 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] 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] 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] 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] helper spec not finding rails core helpers

2007-07-31 Thread Jonathan Linowes
Thanks. I didnt know it was a bug. I thought I was doing something wrong. :) linoj On Jul 31, 2007, at 6:20 AM, David Chelimsky wrote: > On 7/31/07, David Chelimsky <[EMAIL PROTECTED]> wrote: >> On 7/30/07, linojon <[EMAIL PROTECTED]> wrote: >>> Hi, >>> >>> My helper specs were going ok until I

[rspec-users] upgrading from CURRENT to trunk

2007-07-31 Thread Jonathan Linowes
I've been on CURRENT I tried to switch to trunk but its not completing. How do I install the trunk version? (for rails) (I apologize in advance for being clueless) Here's my steps: First, I brought everything I have up to date: $ sudo gem update ZenTest $ sudo gem update rspec

Re: [rspec-users] helper spec not finding rails core helpers

2007-07-31 Thread Jonathan Linowes
I'm having trouble logging into RubyForge (might be my firewall, both firefox and safari are not taking its cookie). I wanted to add this comment to http://rubyforge.org/tracker/index.php? func=detail&aid=12714&group_id=797&atid=3149 The pagination helper has been removed from ra

Re: [rspec-users] installing trunk (was: upgrading from CURRENT to trunk)

2007-07-31 Thread Jonathan Linowes
Hi, I must be missing something obvious. $ rm -rf vendor/plugins/rspec $ script/plugin install svn://rubyforge.org/var/svn/rspec/trunk rspec Exported revision 2188. Plugin not found: ["svn://rubyforge.org/var/svn/rspec/trunk", "rspec"] $ ls vendor/plugins rspec/

Re: [rspec-users] installing trunk (was: upgrading from CURRENT to trunk)

2007-07-31 Thread Jonathan Linowes
dang, I was looking at "Home >> Install" http://rspec.rubyforge.org/download.html and obviously missed that link Thank you and sorry to be a bother On Jul 31, 2007, at 11:15 PM, David Chelimsky wrote: > > Sorry - I typed it wrong. See > http://rspec.rubyforge.org/documentation/rails/install.htm

[rspec-users] rspec and active_scaffold

2007-08-09 Thread Jonathan Linowes
Hi, Anyone here have a link or tips for a complete spec for a dead simple active_scaffold controller, including its internal calls stubbed out which we could use as a starting point? thanks. linoj ___ rspec-users mailing list rspec-users@rubyforge.

Re: [rspec-users] template.expect_render

2007-08-11 Thread Jonathan Linowes
Hi, I'd like to stub out a partial call but not sure how. I tried something like this it "should render partial foo" do template.stub_render("bar/foo") render "/layouts/bar.html.erb" response.should render("bar/foo") end but the partial is still getting called On Jun 27,

Re: [rspec-users] template.expect_render

2007-08-11 Thread Jonathan Linowes
quot; neither case seems to try to render the partial On Aug 11, 2007, at 6:11 AM, Jonathan Linowes wrote: > > Hi, I'd like to stub out a partial call but not sure how. > > I tried something like this > >it "should render partial foo" do > template.s

[rspec-users] nested layouts

2007-08-11 Thread Jonathan Linowes
hi, I'm using a helper like in nested-layouts plugin as follows def inside_layout(layout, &block) layout = layout.include?('/') ? layout : "layouts/#{layout}" @template.instance_variable_set('@content_for_layout', capture (&block)) concat( @template.render( :file => layo

[rspec-users] expect_render not?

2007-08-13 Thread Jonathan Linowes
hi, I have a template that conditionally renders a partial. Is there a way to test that a partial is NOT rendered? :) ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] active_scaffold partials

2007-08-15 Thread Jonathan Linowes
An issue I've run into is with a controller using the active_scaffold plugin, which injects a method that modifies the search path for partial files. When I try to run a spec on a a_s partial it reports the file cannot be found. I think this is the a_s code that does it but I'm not sure wher

[rspec-users] restful named routes

2007-08-15 Thread Jonathan Linowes
2007, at 7:52 AM, Scott Taylor wrote: > > On May 29, 2007, at 4:54 AM, Jonathan Linowes wrote: > >> >> - Is there a way to test named routes? > > I don't think there is a very clean & direct way (hopefully the > others on the list can correct me). The rspec

Re: [rspec-users] Deprecating the mocking framework?

2007-09-04 Thread Jonathan Linowes
Personally, I dont want to become an expert at the range of possible testing and mocking tools. I just want a solid framework to get my work done, recommended by experts like you. And the less different components I need to install and maintain, the better. So I prefer the integrated approa

Re: [rspec-users] response.should render_layout ....

2007-09-05 Thread Jonathan Linowes
Here's how I did it http://rubyforge.org/pipermail/rspec-users/2007-May/001818.html linoj On Sep 5, 2007, at 9:58 AM, Ingo Weiss wrote: > Hi, > > is there a way to assert in rspec that a template is rendered in a > specific layout? > > Thanks! > Ingo > _

[rspec-users] simple story, extract link

2007-09-25 Thread Jonathan Linowes
hi, I just started fooling around with story runner, thought I'd start with a dead simple scenario: The first thing I do when describing a site to someone is go to the home page, and begin exploring public pages from there. So, that seems like a good first story to spec out. And I'd really li

Re: [rspec-users] simple story, extract link

2007-09-25 Thread Jonathan Linowes
<[EMAIL PROTECTED]> wrote: >> On 9/25/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: >>> hi, >>> >>> I just started fooling around with story runner, thought I'd start >>> with a dead simple scenario: >>> The first thing I do when describ

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Jonathan Linowes
Scott, Thanks for the plug-in, http://thmadb.com/public_svn/plugins/ fixture_replacement I've started using it, replacing my ad hoc factory methods And I like the idea of putting the factory in db/ btw, for the record, while the Dan Manges blog was posted Aug 07, the first time I saw this techn

Re: [rspec-users] How do I best setup data for Story Runner?

2007-09-28 Thread Jonathan Linowes
ught On Sep 28, 2007, at 5:11 PM, Scott Taylor wrote: > > On Sep 28, 2007, at 1:20 PM, Jonathan Linowes wrote: > >> Scott, >> Thanks for the plug-in, http://thmadb.com/public_svn/plugins/ >> fixture_replacement >> I've started using it, replacing my ad hoc fa

Re: [rspec-users] Posted this in "dev" last night but I'm not sure that anyone reads it

2007-10-01 Thread Jonathan Linowes
If you add the pending statement before other non-pending ones, it stops at the first pending one. That forces me to implement them in the order specified, a rough example: Then "user was authorized to perform this action" And "action was completed correctly" do ... end On Sep 14,

[rspec-users] flash in story runner

2007-10-01 Thread Jonathan Linowes
hi, is there a way to assert a flash message directly in story runner? Or do I have to go through the response text instead. Then "flash message should say success" do #flash[:notice].should == "User successfully invited" response.should have_text(/User successful

[rspec-users] skip pending (was Re: Posted this in "dev" last night but I'm not sure that anyone reads it)

2007-10-01 Thread Jonathan Linowes
steps, one red or yellow step (the failing or pending one), and the remaining unexecuted ones in grey. On 10/1/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: If you add the pending statement before other non-pending ones, it stops at the first pending one. That forces me to imple

[rspec-users] color output?

2007-10-02 Thread Jonathan Linowes
does story runner have commandline options ,eg to add color to output? ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] color output?

2007-10-02 Thread Jonathan Linowes
ches welcome! > > Actually - there's nothing to patch yet - we plan to align the runners > in the near future. So > > Not yet. Coming soon! > >> >> On 10/2/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: >>> does story runner have commandlin

Re: [rspec-users] color output?

2007-10-02 Thread Jonathan Linowes
On Oct 2, 2007, at 3:45 PM, David Chelimsky wrote: > I didn't realize we had taken this private - I'd like to keep this > discussion on the list so others can contribute to it. OK with you? > > On 10/2/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: >> Thanks,

Re: [rspec-users] simple story, extract link

2007-10-02 Thread Jonathan Linowes
should have_text(/Item successfully created!/) > response.should have_text(/Ruby for Rails/) > end > end I realize this goes against http://dannorth.net/whats-in-a-story but it seems more correct than putting those actions into Given clauses. On Sep 25, 2007, at 6:48 P

Re: [rspec-users] skip pending

2007-10-08 Thread Jonathan Linowes
fyi, In the meantime I've written a little helper def skip_pending(text='') puts "SKIP PENDING #{text}" end so I can do And "foo foo bar bar" do skip_pending "Implement foo bar" end On Oct 1, 2007, at 10:44 PM, Jonathan Linowes wrote: The wa

Re: [rspec-users] locals in partials

2007-10-12 Thread Jonathan Linowes
oops, of course that last line wouldnt be commented out On Oct 12, 2007, at 12:47 PM, Jonathan Linowes wrote: > > that works for you? > I'm basically doing the same thing but the > > render "/pages/_page_menu.html.erb", :locals => { :pages => @foo } &g

Re: [rspec-users] locals in partials

2007-10-12 Thread Jonathan Linowes
<%# pages ||= @foo #kludge for rspec %> On Oct 12, 2007, at 11:51 AM, Hans de Graaff wrote: > On Fri, 2007-10-12 at 10:33 -0400, Jonathan Linowes wrote: >> hiya, in specing a partial, how can i assign a local var that is >> normally passed via :locals ? i tried adding :

[rspec-users] locals in partials

2007-10-12 Thread Jonathan Linowes
hiya, in specing a partial, how can i assign a local var that is normally passed via :locals ? i tried adding :locals => to the render call but that doesnt seem to take linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.o

Re: [rspec-users] Top Quoting?

2007-10-15 Thread Jonathan Linowes
+1 On Oct 15, 2007, at 2:38 PM, s.ross wrote: > Sort of off-topic and don't mean to complain, but many on this list > use top quoting. That works ok if you don't quote the whole previous > thread. However, I'm finding that scrolling forever to locate the > reply on longer threads is getting tedio

[rspec-users] intro article

2007-10-15 Thread Jonathan Linowes
fyi http://www.vaporbase.com/postings/ Beginners_Guide_to_Rspec_on_Story_Runner ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Top Quoting?

2007-10-15 Thread Jonathan Linowes
Not to beat an already beaten horse, but... I see email more as a dynamic information flow than a static page, especially active conversations like this, so I like to see the current response at the top, immediately accessible, and visible in my preview pane. Or, maybe I should look for a mail read

[rspec-users] works in script but not in rake

2007-10-16 Thread Jonathan Linowes
Hi, This is weird All my current spec examples are passing (about 750 of 'em) except a set of 6 in a specific controller spec. I get the following failure on each 6 when I run it via $ rake spec for example: --- ActionController::UnknownAction in 'MembershipsController handling PUT /pro

Re: [rspec-users] works in script but not in rake

2007-10-16 Thread Jonathan Linowes
btw I just noticed the text of the example is a typo, it -is- a GET called in the spec with get :accept, :project_id => @project.id, :id => @mem.id On Oct 17, 2007, at 1:01 AM, Jonathan Linowes wrote: > Hi, > > This is weird > > All my current spec examples are pass

Re: [rspec-users] Scenarios Plugin Pre-Announcement

2007-10-16 Thread Jonathan Linowes
how about "factory"? or something along that metaphor "assemblies" ... "erections"? maybe not... :) On Oct 17, 2007, at 1:33 AM, John W. Long wrote: > On 10/16/07, Pat Maddox <[EMAIL PROTECTED]> wrote: >> I would recommend that you rename it, because "Scenario" already >> has a >> precise me

Re: [rspec-users] works in script but not in rake

2007-10-17 Thread Jonathan Linowes
On Oct 17, 2007, at 1:26 AM, David Chelimsky wrote: > On 10/17/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: >> Hi, >> >> This is weird >> >> All my current spec examples are passing (about 750 of 'em) except a >> set of 6 in a specific control

Re: [rspec-users] plain text stories: motivation number 27

2007-10-17 Thread Jonathan Linowes
On Oct 17, 2007, at 10:41 AM, David Chelimsky wrote: > This is mostly theoretical, but ... > > I'm starting to use lighthouse (http://llighthouseapp.com) for my > projects at work. I'm organizing iterations as milestones and stories > as tickets tagged to a milestone. > > Lighthouse offers an API

Re: [rspec-users] plain text stories: motivation number 27

2007-10-17 Thread Jonathan Linowes
On Oct 17, 2007, at 11:26 AM, David Chelimsky wrote: > > > >> wow, and maybe some day, you could press a button to generate a >> screencast of a story... >> (almost not kidding...) > > Actually you can already do better than a screencast using tools like > watir and selenium which actually run

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Jonathan Linowes
On Oct 19, 2007, at 1:54 PM, s.ross wrote: On Oct 18, 2007, at 6:09 AM, Daniel N wrote: On 9/11/07, s.ross <[EMAIL PROTECTED]> wrote: I have a story where the user resets the password [hey, this story thing really rocks!]. It is expected that the password will change and that the user will be

Re: [rspec-users] Side Effects in Stories

2007-10-19 Thread Jonathan Linowes
On Oct 19, 2007, at 3:30 PM, Ben Mabey wrote: > yes, upon closer inspection, (as in http://www.vaporbase.com/postings/ Rspec_1.0_and_Restful_Authentication) in spec_helper.rb def set_mailer_in_test ActionMailer::Base.delivery_method = :test ActionMailer::Base.perform_deliveries = true

Re: [rspec-users] Assumption tests

2007-10-19 Thread Jonathan Linowes
But dont you really just want to test the behavior of the class? (whereas the validator call is an implementation) such as it "should require digits" do p = PhoneNumber.new( :digits => nil ) p.should_not be_valid p.errors.on(:digits).should == "can't be blank" end On Oct 19,

Re: [rspec-users] Preferred mock framework

2007-10-22 Thread Jonathan Linowes
On Oct 21, 2007, at 10:34 AM, David Chelimsky wrote: > > Thanks. Unfortunately, as the list of users grows, I do have to change > a bit if I want to get my other work done, write a book, and still > have a life. Luckily, there are some thoughtful people, including > yourself, emerging as mentors

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-22 Thread Jonathan Linowes
On Oct 22, 2007, at 12:18 AM, Steve wrote: > On Tue, 09 Oct 2007 21:12:09 +0100, Matt Patterson wrote: > >> It occured to me that it would be nice to have a spec that would barf >> if I ever nuked the layout's yield (or, indeed, one of its >> content_for yields), mainly because they're the integr

Re: [rspec-users] Testing layouts with RSpec on Rails

2007-10-22 Thread Jonathan Linowes
Oct 2007 10:40:45 -0400, Jonathan Linowes wrote: > >> I'm not sure if this is what you're after but I've created this >> custom matcher to my spec_helper.rb, then in my controller spec I can >> say >> >> # custom matchers >> #- &

Re: [rspec-users] plain text stories

2007-10-23 Thread Jonathan Linowes
http://www.georgeglazer.com/prints/illus/wein-monkeydress.JPG On Oct 23, 2007, at 11:11 AM, Dan North wrote: Of course when I said "Pat", I in fact meant "David and his monkey" :) On 10/22/07, Pat Maddox < [EMAIL PROTECTED]> wrote: On 10/22/07, Dan North < [EMAIL PROTECTED]> wrote: > Haha - b

Re: [rspec-users] How is everyone structuring stories?

2007-10-23 Thread Jonathan Linowes
"app" is short for "application", "lib" is short for "library" so why not shorten "behavior" to something like "beh" or "behav" (also avoids the 2 english spellings) /beh/specs /beh/stories On Oct 23, 2007, at 6:02 PM, Ashley Moran wrote: > > On Oct 23, 2007, at 9:55 pm, David Chelimsky wrote:

Re: [rspec-users] How is everyone structuring stories?

2007-10-24 Thread Jonathan Linowes
On Oct 23, 2007, at 6:32 PM, David Chelimsky wrote: > On 10/23/07, Jonathan Linowes <[EMAIL PROTECTED]> wrote: >> "app" is short for "application", >> "lib" is short for "library" >> so why not shorten "behavior&quo

Re: [rspec-users] Working with the response DOM

2007-10-24 Thread Jonathan Linowes
I've been wondering the same for quite a while http://www.nabble.com/simple-story,-extract-link-t4518721.html but hadnt asked the question so succinctly In that thread, Pat suggests helpers like click_link and submit_form If you progress along these lines, please post your solution, I'm very int

Re: [rspec-users] Setting session values

2007-10-24 Thread Jonathan Linowes
i've done this in controller specs session[:whatever] = something do_it --linoj On Oct 24, 2007, at 9:06 PM, Steve wrote: > Okay, I give up. I have been trying to set session values in a > controller, > but no matter what, once the request is made and inside the > controller, > the session

[rspec-users] rspec and capistrano

2007-10-26 Thread Jonathan Linowes
Hi, has anyone here written a capistrano task for rspec to run through my specs on the deployed server? I'd appreciate a snippet or two to get me started. Thx linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/li

[rspec-users] rake spec default environment

2007-10-29 Thread Jonathan Linowes
hi, When I run rake spec , it seems to be starting with my default environment (development or production) and connects to that database, before actually connecting to the test one and proceeding with the tests. When I remove the development database, the specs wont run. How do i initiate

Re: [rspec-users] rake spec default environment

2007-10-29 Thread Jonathan Linowes
On Oct 29, 2007, at 10:55 AM, Scott Taylor wrote: > > On Oct 29, 2007, at 9:04 AM, Jonathan Linowes wrote: > >> hi, >> >> When I run rake spec , it seems to be starting with my default >> environment (development or production) and connects to that >> data

Re: [rspec-users] rake spec default environment

2007-10-29 Thread Jonathan Linowes
On Oct 29, 2007, at 9:04 AM, Jonathan Linowes wrote: > hi, > > When I run rake spec , it seems to be starting with my default > environment (development or production) and connects to that > database, before actually connecting to the test one and proceeding > with the tests.

Re: [rspec-users] Not sure why this is failing

2007-11-18 Thread Jonathan Linowes
personally I find this to be one of the most frustrating things about rspec, well, rspec's stubs and wish the error messages could be much more helpful, rather than just telling that an expected method was not called, tell me if/when it was called with some other args instead (if this causes ex

[rspec-users] rubyforge (was Re: Not sure why this is failing)

2007-11-18 Thread Jonathan Linowes
ker. On Nov 18, 2007, at 11:16 AM, David Chelimsky wrote: > On Nov 18, 2007 10:10 AM, Jonathan Linowes > <[EMAIL PROTECTED]> wrote: >> personally I find this to be one of the most frustrating things about >> rspec, well, rspec's stubs >> and wish the error m

Re: [rspec-users] Down with Lambda!!

2007-11-18 Thread Jonathan Linowes
# for readability alias :running :lambda Q.E.D. On Nov 18, 2007, at 2:07 PM, Shane Mingins wrote: > > On 18/11/2007, at 1:01 PM, David Chelimsky wrote: >> We're still writing Ruby here, aren't we!!! >> >> Cheers, >> David >> >> > > > Wanted to share my initial reaction to your Ruby statement. >

Re: [rspec-users] help anyone?

2007-11-18 Thread Jonathan Linowes
David, If no one else offers a more efficient solution, I'm willing to manually copy the open tickets. (I count 37 of them) I have read access to Rubyforge and see this as an opportunity to get familiar with lighthouse Jonathan On Nov 18, 2007, at 4:16 PM, David Chelimsky wrote: > Hi everybo

Re: [rspec-users] rake spec default environment

2007-11-19 Thread Jonathan Linowes
velopment" env or db, the rake spec fails Is there a way to force the rake task to copy the schema from "production" rather than "development"? linoj On Oct 29, 2007, at 10:55 AM, Scott Taylor wrote: > > On Oct 29, 2007, at 9:04 AM, Jonathan Linowes wrote: >

[rspec-users] cap deploy:spec

2007-11-20 Thread Jonathan Linowes
fyi, I just posted this http://www.vaporbase.com/postings/Running_rspec_after_you_deploy - linoj ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] cap deploy:spec

2007-11-20 Thread Jonathan Linowes
On Nov 20, 2007, at 8:07 PM, Pat Maddox wrote: > On Nov 20, 2007 2:55 PM, Jonathan Linowes <[EMAIL PROTECTED]> > wrote: >> fyi, I just posted this >> >> http://www.vaporbase.com/postings/Running_rspec_after_you_deploy >> >> - linoj >>

Re: [rspec-users] cap deploy:spec

2007-11-20 Thread Jonathan Linowes
On Nov 20, 2007, at 8:36 PM, Jonathan Linowes wrote: > > On Nov 20, 2007, at 8:07 PM, Pat Maddox wrote: > >> On Nov 20, 2007 2:55 PM, Jonathan Linowes <[EMAIL PROTECTED]> >> wrote: >>> fyi, I just posted this >>> >>> http://www

Re: [rspec-users] [ANN] Webrat 0.1.0 released - Ruby Acceptance Testing for Web applications

2007-11-29 Thread Jonathan Linowes
/me in love :) On Nov 29, 2007, at 12:44 PM, Bryan Helmkamp wrote: > Hey guys, > > We developed this plugin while writing my first real set of RSpec > stories. It's still missing a lot of functionality, but it's useful to > us as is, so I'm shipping 0.1.0. (Patches welcome. :) ) > > Code is ava

  1   2   >