Re: [rspec-users] features and form filling - going declarative?

2008-11-07 Thread Jay Levitt
it's actually a solvable problem - something, somewhere has to know how to fill in the form. Either you do it in the scenario, where it gets repeated a lot, or you refactor it into the matcher, which requires enough programming ability to understand refactoring, abstraction, and function c

Re: [rspec-users] Happy Christmas Thread

2008-12-25 Thread Jay Levitt
Andrew Premdas wrote: Happy X-MAS all you rspeccers and cucumberists :-) I believe that's "cucus". Jay ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec

Re: [rspec-users] Fixjour and others

2009-02-07 Thread Jay Levitt
hments, or what have you. As easy as Github makes forking, the choice of libraries should no longer be driven by "this one was updated most recently" or "this one uses the most recent design idioms". As someone wrote recently: The minute you start coding, you're writing

[rspec-users] [Cucumber] autotest+growl or similar?

2009-03-30 Thread Jay Levitt
I've got autotest 4.0.0 working with Cucumber 0.2.3 by following the Autotest Integration instructions in the wiki. But I can't figure out a way to get automatically notified of the results, via growl or anything else: - Cucumber doesn't trigger the :red and :green hooks in autotest. (I think

[rspec-users] got/expects causes mental layering violation

2007-08-02 Thread Jay Levitt
I was, for the first time, spec'ing a class that redefined ==. And my spec was incorrect, so == was returning false. The result was something like: class C def ==(other) false end end .. C.new.should == other... expected other, got # (using ==) But wait! Why on earth is == return

Re: [rspec-users] got/expects causes mental layering violation

2007-08-02 Thread Jay Levitt
David Chelimsky wrote: > On 8/2/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> I was, for the first time, spec'ing a class that redefined ==. And my >> spec was incorrect, so == was returning false. >> >> The result was something like: >> >> c

Re: [rspec-users] Plugins 'speced' with rSpec?

2007-08-03 Thread Jay Levitt
Fischer, Daniel wrote: > Hello, > > I'm trying to figure out how to setup a spec structure for plugins. I'm > getting pretty lost in figuring out how to isolate a plugin enviornment > emulating rails, but not actually being reflected upon the current rails > project. I just saw an article yest

[rspec-users] Specifying custom rails FormBuilders

2007-08-06 Thread Jay Levitt
I want to write a spec for a custom form builder, but I'm not really sure where it should live or how to include the right rspec_on_rails contexts. Ideally, I should be able to write a spec like: describe LabelledBuilder do it "should let me create a text field" do object = mock(object

Re: [rspec-users] Specifying custom rails FormBuilders

2007-08-06 Thread Jay Levitt
David Chelimsky wrote: > On 8/6/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> I want to write a spec for a custom form builder, but I'm not really >> sure where it should live or how to include the right rspec_on_rails >> contexts. Ideally, I should be able to writ

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-08 Thread Jay Levitt
David Chelimsky wrote: > On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: >> All I'm doing is passing the instance variables @label and @artist in >> the controller to the view using this code: >> >> @label = current_user.labels.find(params[:label_id]) >> @artist = params[:id].nil? ? Artist.new

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-12 Thread Jay Levitt
David Chelimsky wrote: > On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: >> Thanks for your patience trying to resolve this issue. I posted a bug >> report here: >> >> http://rubyforge.org/tracker/index.php?func=detail&aid=12963&group_id=797&atid=3149 > > I see it - thanks. If you have time n

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-12 Thread Jay Levitt
Lance Carlson wrote: > It was never resolved.. the only resolution was to mock out the > methods at this point or provide the views with the instance > variables. Well, I didn't get anywhere tonight - but I did discover that script/console has the same problem. Given routes.rb: map.resources :u

[rspec-users] Backtrace tweaker - broken or me?

2007-08-13 Thread Jay Levitt
'm heading home and don't have time to dig into it right now, but has anyone else seen this? Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Jay Levitt
> I'd like to avoid that because it would be extra noise and it > shouldn't be necessary. The generated specs work absolutely perfectly > for me as/is (I'm on OS X). There have been a couple of bugs related > to regexps and windows paths over time, but they've either been > resolved or await more f

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Jay Levitt
aslak hellesoy wrote: > On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >>> I'd like to avoid that because it would be extra noise and it >>> shouldn't be necessary. The generated specs work absolutely perfectly >>> for me as/is (I'm on OS

Re: [rspec-users] undefined method `mock_model' for [RSpec example]:#

2007-08-20 Thread Jay Levitt
On 8/20/2007 8:20 AM, aslak hellesoy wrote: > On 8/20/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >>> I'd like to avoid that because it would be extra noise and it >>> shouldn't be necessary. The generated specs work absolutely perfectly >>> for me as

[rspec-users] Foreign key constraints, fixtures, and rake task

2007-08-26 Thread Jay Levitt
/behaviour/model.rb:12:in `before_eval' I've even manually run the entire "ruby -I" command that rake generates, and it works fine. I can't see that the rake task's doing anything different other than db:test:prepare, which I can do manually with

Re: [rspec-users] Foreign key constraints, fixtures, and rake task

2007-08-27 Thread Jay Levitt
Tilmann Singer wrote: > * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]: >> What's rake doing differently? > > rake spec isn't doing anything fundamentally different, but the order > the specs are run is propably randomly different from when you run > the

Re: [rspec-users] Foreign key constraints, fixtures, and rake task

2007-08-27 Thread Jay Levitt
David Chelimsky wrote: > On 8/27/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> Tilmann Singer wrote: >>> * Jay Levitt <[EMAIL PROTECTED]> [20070827 03:51]: >>>> What's rake doing differently? >>> rake spec isn't doing anything fundamental

Re: [rspec-users] Foreign key constraints, fixtures, and rake task

2007-08-27 Thread Jay Levitt
Jim Deville wrote: >> > > Just wondering about your usage of constraints. We ran into this > issue recently and came to the conclusion that unless profiling shows > an issue, use AR to enforce referential integrity. You might be able > to get by using :dependent => :destroy, or one of the o

Re: [rspec-users] issue with edge rails and urls

2007-08-27 Thread Jay Levitt
J.D. Hollis wrote: > I just switched our project over to Edge Rails, and I'm running into > this problem with all of my helper methods that call _url methods: Check out the patch at: http://rubyforge.org/tracker/index.php?func=detail&aid=13186&group_id=797&atid=3151 Jay __

Re: [rspec-users] mock_model in spec/lib

2007-08-30 Thread Jay Levitt
they don't live in a special-case dir, or if it would be better for lib to be another special case. Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] mock_model in spec/lib

2007-08-30 Thread Jay Levitt
Edward Ocampo-Gooding wrote: > David Chelimsky wrote: >> On 8/30/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >>> Has anyone else run into a problem with trying to use mock_model in >>> spec/lib ? >>> For some reason, I can take the same spec, put it in spec/models, have it >>> run >>> fi

Re: [rspec-users] mock_model in spec/lib

2007-08-30 Thread Jay Levitt
David Chelimsky wrote: > On 8/30/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> Edward Ocampo-Gooding wrote: >>> David Chelimsky wrote: >>>> On 8/30/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >>>>> Has anyone else run into a

Re: [rspec-users] How do you keep mocks updated without pain?

2007-09-02 Thread Jay Levitt
On 8/29/2007 6:19 PM, Zach Dennis wrote: > In rspec, controller, model and view specs are just unit tests/specs. And that's really the key; in Rails Test::Unit, model tests are unit tests, and controller tests are higher-level "functional" tests. So you never get to unit-test your controllers.

Re: [rspec-users] testing behaviour or testing code?

2007-09-02 Thread Jay Levitt
ing anything but digits" do PhoneNumber.new("800-MATTRESS").should_not be_valid end And then, every time I find an edge case, I add another spec: it "should allow me to enter dashes" do PhoneNumber.new("800-555-1212").should be_valid end it "should o

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Jay Levitt
Shane Mingins wrote: > > On 5/09/2007, at 8:51 AM, Geoffrey Wiseman wrote: > >> >> Using this as an example, if a new validation rule is added, this test >> will fail without indicating /why/. Sure, I can get that answer in >> other ways, but I'd hate to discover things like: >> >> it "should

Re: [rspec-users] Failure Messages in RSpec

2007-09-04 Thread Jay Levitt
Chad Humphries wrote: > I generally write custom expectation matchers when I want more > specific information on failure scenarios. Granted this might not > work in all scenarios (taking time to write a custom matcher I mean), > but for most things it has made it very nice. Hmm, I wonder if

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

2007-09-05 Thread Jay Levitt
Lance Carlson wrote: > If core was to deprecate the included mocking framework, then why > would they favor mocha over flexmock? I agree we need to have some > agreement as to which one to use, but why the favoritism? If my grandmother had wheels, would she be a skateboard? They're not deprecatin

Re: [rspec-users] testing behaviour or testing code?

2007-09-06 Thread Jay Levitt
On 9/2/2007 11:49 PM, David Chelimsky wrote: > On 9/2/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >> On 9/2/2007 12:43 PM, David Chelimsky wrote: >>> The problem we face is that AR promises huge productivity gains for >>> the non TDD-er, and challenges th

Re: [rspec-users] testing behaviour or testing code?

2007-09-07 Thread Jay Levitt
Wincent Colaiuta wrote: > El 7/9/2007, a las 5:36, Jay Levitt escribió: > > Very true that you shouldn't be testing ActiveRecord's validation > (Rails' own unit tests are there for that). > > But if you want to do truly *driven* BDD then you will have to t

Re: [rspec-users] Failure Messages in RSpec + inline debugging of a spec

2007-09-08 Thread Jay Levitt
On 9/8/2007 4:19 PM, Scott Taylor wrote: > So far it has been > a mixed experience - I have found that it doesn't work very well with > rails as you end up debugging more of rails then of your own code. Finally, a debugging environment that matches the production environment! Jay

Re: [rspec-users] Philosophical questions

2007-09-12 Thread Jay Levitt
On 9/12/2007 3:55 PM, Evan David Light wrote: > Disclaimer: The following are observations by a relatively new user > (couple of weeks) of RSpec and not intended as RSpec trollbait. Also, > forgive me if similar topics have been discussed elsewhere on the > mailing list. I at least did the d

Re: [rspec-users] Checking out Rspec

2007-09-13 Thread Jay Levitt
On 9/13/2007 9:43 AM, Bret Pettichord wrote: > On 9/12/07, *Scott Taylor* <[EMAIL PROTECTED] > > wrote: > > I have been having connection problems with rspec's rubyforge > repository for a long time. I'm running my own mirror if you want > the subversion lin

[rspec-users] I lost the RSpec fight

2007-09-16 Thread Jay Levitt
lize them to start using RSpec, so it's not some "neat fringe thing", but a solid, respectable alternative to Test::Unit. Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] I lost the RSpec fight

2007-09-16 Thread Jay Levitt
On 9/16/2007 10:18 AM, Kevin Williams wrote: > By all means, they should not ever try anything new. The people of > Earth should not have ever adopted the use of the electric light bulb > or the radio or the automobile or the airplane or the microwave or the > telephone or ... the Internet. No, don

Re: [rspec-users] alias :calling :lambda

2007-09-19 Thread Jay Levitt
On 9/19/2007 11:04 PM, Scott Taylor wrote: > On Sep 19, 2007, at 10:17 PM, Jed Hurt wrote: > >> Sprinkling my examples with 'lambda' has always seemed like a bit of a >> wart to me. I've gotten into the habit of adding 'alias :calling >> :lambda' to my spec suites. My examples then look like: >> >

Re: [rspec-users] Step matchers

2007-10-14 Thread Jay Levitt
On 10/14/2007 8:09 PM, Pat Maddox wrote: > In general, I prefer your syntax, making it look like a plain-text > spec instead of Ruby code. I question whether it's a big enough win > to justify writing a parser instead of simply writing valid Ruby. ANT-LR! ANT-LR! ANT-LR! Jay ___

Re: [rspec-users] Top Quoting?

2007-10-15 Thread Jay Levitt
On 10/15/2007 5:04 PM, aslak hellesoy wrote: > Good point. Reminds me of this classic: > > A: Because it breaks the logical sequence of the discussion. > Q: Why is top-posting such a bad thing? > A: Top-posting. > Q: What is the most annoying thing on usenet and in e-mail? > > On 10/15/07, s.ross

Re: [rspec-users] Step matchers

2007-10-15 Thread Jay Levitt
On 10/15/2007 10:11 AM, Wincent Colaiuta wrote: > El 15/10/2007, a las 14:21, "Pat Maddox" <[EMAIL PROTECTED]> escribió: >> Jay mentioned antlr. This parser is so simple though that I doubt we >> would need/want that. There's not really any parsing at all in fact. >> You just look at each line, f

Re: [rspec-users] Step matchers

2007-10-15 Thread Jay Levitt
On 10/15/2007 6:11 PM, Pat Maddox wrote: > On 10/15/07, James Hughes <[EMAIL PROTECTED]> wrote: >> Just wanted to chime in and say, as a regular user of the folding >> features of the editor, this is what really resonated with me when >> Story Runner was first introduced. In fact, I recently did a

Re: [rspec-users] Assumption tests

2007-10-20 Thread Jay Levitt
oining the large list of open source tools I use that I'm gonna go "fix" someday... Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2007-10-20 Thread Jay Levitt
On 10/17/2007 10:41 AM, David Chelimsky wrote: > It seems to me that a plain text story could be stored in a lighthouse > ticket, read in via the lighthouse API ... AND EXECUTED BY STORY > RUNNER. Not crazy at all. I've seen fancy systems (IIRC, RallyDev is one) that integrate automation testing

Re: [rspec-users] Assumption tests

2007-10-20 Thread Jay Levitt
On 10/20/2007 12:09 PM, Pat Maddox wrote: > I've read plenty of > sources that say a unit test only touches one class, and if you're > interacting with more than one class then it's an integration test. > That's a silly distinction to make Very! I think we all know here that a unit test tests

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

2007-10-22 Thread Jay Levitt
On 10/22/2007 5:25 AM, David Chelimsky wrote: > $yielded = false ::Cough:: I believe the past tense is "yelt". Jay ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] RSpec'd plugin in a non-RSpec rails app?

2007-10-24 Thread Jay Levitt
ugin, even if such a thing would work. Yet it would be nice if the app's continuous integration server could run specs against all its plugins. Any thoughts? Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyfo

Re: [rspec-users] Using Mechanize in Story Step Implementations

2007-10-25 Thread Jay Levitt
;email" field, and 3. that the post works. I had a recent bug where I actually broke the "get" completely (crashed), and I'm sure we've all seen bugs where we change a field name in one case but not the other, so it&#x

Re: [rspec-users] Mocks? Really?

2007-12-30 Thread Jay Levitt
*/ /* incredibly dangerous – but MainLoop is */ /* very unlikely to change now (spring '00) */ Careful about those assumptions. Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mocks? Really?

2007-12-30 Thread Jay Levitt
On 12/30/2007 3:29 PM, Francis Hwang wrote: > On Dec 30, 2007, at 1:52 PM, Jay Levitt wrote: > >> On 12/29/2007 5:46 PM, Francis Hwang wrote: >> >>> - How quickly the business needs change. Designs for medical imaging >>> software are likely to change l

Re: [rspec-users] Mocks? Really?

2007-12-30 Thread Jay Levitt
bedside table or my kitchen counter. I'm having the opposite problem. I moved from a huge house (that I specifically designed to always look clean) to a good-sized apartment, and discovered I'm a disgusting, unsanitary slob. (I have no idea how this relates to RSpec. I just wanted to sha

[rspec-users] old plugin points to old docs to explain how to upgrade to new plugin

2008-08-06 Thread Jay Levitt
of course, the details aren't there anymore; they're over at rspec.info. Maybe the old URL should redirect? Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Stories run with "ruby", not "spec"

2008-08-08 Thread Jay Levitt
Since there's no real documentation for stories yet, and since none of the blog posts about it ever show it being run, I thought some other newbie might find this useful information when they're Googling: You don't run RSpec stories with spec! You run them with ruby. For instance, in Ben Mabe

[rspec-users] RSpactor: Black is the new green?

2008-08-08 Thread Jay Levitt
Andreas Wolff wrote: It took me a while to get the next release out, but I finally managed to release RSpactor 0.9.16, a Mac OS X RSpec runner. There are no new features but RSpactor should be a lot more stable and responsive now. If you want to have a look and download: http://rubyphunk.com/

Re: [rspec-users] Straw Poll: How are you using plain text stories (in rails)?

2008-08-08 Thread Jay Levitt
Matt Wynne wrote: Hi all, What originally attracted me to rspec was hearing Dan North talk about the plain text stories, and I had some fun in my previous life as a C# programmer using them to drive watir tests of an ASP.NET app. What I'm not sure about is how they're most appropriately used i

Re: [rspec-users] Do you remember RSpactor?

2008-08-08 Thread Jay Levitt
Andreas Wolff wrote: It took me a while to get the next release out, but I finally managed to release RSpactor 0.9.16, a Mac OS X RSpec runner. There are no new features but RSpactor should be a lot more stable and responsive now. If you want to have a look and download: http://rubyphunk.com/

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

2008-08-08 Thread Jay Levitt
Zach Dennis wrote: [1, 2, 3, 4, 1].should consist_of([1, 3, 1, 4, 2]) +1 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] I want RSpec for CSS layout.

2008-08-19 Thread Jay Levitt
I don't even know how it'd be possible (through Selenium?), but I want it. I want to see if my stupid CSS hacks break. I want to say: describe "#nav-column" do body = something("#body-column") it "should line up at the top" do dom[:top].should_be == body.dom[:top] end it "should a

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

2008-08-24 Thread Jay Levitt
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 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge

Re: [rspec-users] I want RSpec for CSS layout.

2008-08-30 Thread Jay Levitt
Scott Taylor wrote: On Aug 29, 2008, at 2:39 PM, Dan North wrote: ooh, that would be lovely. LayoutBehave anyone? Well, I don't see why there couldn't be one, assuming there was a CSS parser out there. I've started a treetop CSS2 parser, but just don't have the time to devote to it. A

Re: [rspec-users] [ANN] Cucumber Textmate Bundle

2008-09-18 Thread Jay Levitt
will recognize it. Dunno if that should go in the README or not. Jay Levitt ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users