Re: [rspec-users] #add method?

2007-09-16 Thread David Chelimsky
Can you be more specific? Where have you seen such references? What did they say? Is this even an rspec question? If it's about Rails models, try the rails list. But if you do, be more specific :) On 9/16/07, David James [EMAIL PROTECTED] wrote: I've seen reference to an 'add' method, as in

Re: [rspec-users] rake spec:doc returns NO NAME (due to --dry-run) for each specify block

2007-09-16 Thread David Chelimsky
When you use spec:doc, it does a dry-run, in which case the blocks are never executed, in which case you get this message for every block relying on auto-generated names: describe 5 do it { 5.should == 5} end If you mean to use the specdoc format (i.e. it really runs everything and you get the

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

2007-09-16 Thread David Chelimsky
On 9/16/07, Andrew WC Brown [EMAIL PROTECTED] wrote: I'm going through Peepcode's Rspec Basics for an overview. He's just doing a simple spec: class PeepCode end describe PeepCode do it should be awsome do end end So running spec spec/simple_spec.rb should produce according to

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-16 Thread David Chelimsky
On 9/16/07, s.ross [EMAIL PROTECTED] wrote: While the spirit of BDD is to spec first and code second, many of us have legacy code. Worse, some of us have legacy code without very good coverage. Recognizing that *I* have such code, I created a script that grinds through your .rb files and

Re: [rspec-users] [ANN] rspec_todo -- spec'ing backwards

2007-09-18 Thread David Chelimsky
On 9/17/07, s.ross [EMAIL PROTECTED] wrote: David-- Worse, even though you sell it as a tool for dealing with legacy code (code without tests), it will end up becoming the tool people use I think this is the part that is of the most concern. That people will substitute a tool for good

Re: [rspec-users] rake spec:doc returns NO NAME (due to --dry-run) for each specify block

2007-09-18 Thread David Chelimsky
On 9/17/07, Christopher D. Pratt [EMAIL PROTECTED] wrote: Thanks for all the responses. Unfortunately, I apparently just like being difficult. Tom: I installed the new version of rspec on a fresh app, so the first run of script/generate rspec was from the trunk version ... good idea though,

Re: [rspec-users] given_it

2007-09-21 Thread David Chelimsky
Have you seen shared behaviours? On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote: Hello, Just decided to check whether I am doing something that makes sense or not. I was thinking about how cool would it be to re-use examples (just like we reuse story scenarios with GivenScenario). I

Re: [rspec-users] TextMate Bundle and exception when switching to alternate file.

2007-09-21 Thread David Chelimsky
Please submit this to the tracker as a patch. http://rubyforge.org/tracker/index.php?group_id=797 Thanks, David On 9/21/07, Trevor Squires [EMAIL PROTECTED] wrote: Hey, sorry if this is something better suited to another list. I've encountered a strange problem with the RSpec.tmbundle in

Re: [rspec-users] given_it

2007-09-21 Thread David Chelimsky
, at 10:49 PM, David Chelimsky wrote: Have you seen shared behaviours? On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote: Hello, Just decided to check whether I am doing something that makes sense or not. I was thinking about how cool would it be to re-use examples (just like we

Re: [rspec-users] given_it

2007-09-21 Thread David Chelimsky
On 9/21/07, Yurii Rashkovskii [EMAIL PROTECTED] wrote: Then I will have tens of methods that in fact has nothing really different from reused examples But, as methods, they are more clearly differentiated for reuse. The problem is that if I reuse an example, and then decide to change that

Re: [rspec-users] Testing nested controller

2007-09-22 Thread David Chelimsky
Controller specs are similar to Rails functional tests, except that they don't render views (unless you tell them to). So rather than saying: get notes_path(1,1) you want to say: get :show, :writer_id = 1, :note_id = 1 Give that a shot and let us know if it works out. Cheers, David On

Re: [rspec-users] Odd response.body behavior

2007-09-25 Thread David Chelimsky
On 9/25/07, Luke Galea [EMAIL PROTECTED] wrote: Sorry to bump myself here: But this behavior is really messing my tests up. If anyone has any insight I'd really appreciate it. Even in a debugger, the value of response.body is the name of the template rather than the content, but only in the

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread David Chelimsky
On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: Hi there, I've been working with RSpec for about a week now, and the process of moving from a Test::Unit + Mocha setup to an RSpec + Mocha environment has been pretty straightforward. Except, I'm having problems with using

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread David Chelimsky
On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: On 25 Sep 2007, at 16:06, David Chelimsky wrote: On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: Hi there, I've been working with RSpec for about a week now, and the process of moving from a Test::Unit + Mocha setup to an RSpec

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread David Chelimsky
On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: On 25 Sep 2007, at 17:00, David Chelimsky wrote: Oh - I forgot about that - it actually should work :) Heh. Can you give me some pointers on getting the tests to run cleanly? What platform are you on? OS X, with Ruby 1.8.6 Me too

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread David Chelimsky
On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: On 25 Sep 2007, at 17:12, David Chelimsky wrote: OS X, with Ruby 1.8.6 Me too and I get 100% coverage. I'm running the mysql.com MySQL 5.0.45 mac intel build, and the native mysql gem (2.7), if that helps Are you just getting

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread David Chelimsky
On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: On 25 Sep 2007, at 17:35, David Chelimsky wrote: On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: Two things: 1. If you're patching you should be working w/ trunk, not the release. Yeah, I got the same problem with trunk so I

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread David Chelimsky
On 9/25/07, Matt Patterson [EMAIL PROTECTED] wrote: On 25 Sep 2007, at 19:09, David Chelimsky wrote: I can send you the rcov HTML products if you want... Zip it up! I finally looked at the Rakefile to see where the rcov output was, had a look and... found the problem: Name

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

2007-09-25 Thread David Chelimsky
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 describing a site to someone is go to the home page, and begin exploring public pages from there. So, that

Re: [rspec-users] RSpec + EdgeRails on Windows

2007-09-27 Thread David Chelimsky
On 9/27/07, Luis Lavena [EMAIL PROTECTED] wrote: On 9/27/07, Christopher D. Pratt [EMAIL PROTECTED] wrote: I recently post on my blog about setting up a Rails environment with RSpec in Windows, and someone left a comment saying that it doesn't work in EdgeRails. I so I played around with it

Re: [rspec-users] form action url example

2007-09-28 Thread David Chelimsky
On 9/28/07, sinclair bain [EMAIL PROTECTED] wrote: Hi, I have the following example: it 'should have a form with an action attribute' do response.should have_tag( form[action=?], '/users/1/machines/1/trouble_tickets') end for a form like so: % form_for( :trouble_ticket,

Re: [rspec-users] autotest stop working, 1.0.9?

2007-09-30 Thread David Chelimsky
On 9/30/07, Andrew WC Brown [EMAIL PROTECTED] wrote: My autotest runs but when I make changes to a spec it doesn't reload. Reload? Do you mean it doesn't re-run that spec? I checked another application I was building that had 1.0.9 but it was reloading fine. How would I debug a problem such

Re: [rspec-users] how to spec views

2007-10-01 Thread David Chelimsky
On 10/1/07, Andrew WC Brown [EMAIL PROTECTED] wrote: I'm trying to spec a view but haven't done much view specing. This view render different partials depending on authentication of the user: annon, admin, player So I I'll write if conditionals in the view with the partials it should

Re: [rspec-users] how to spec views

2007-10-01 Thread David Chelimsky
actually has an attribute called grains_of_salt. No Lie. On 10/1/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/1/07, Andrew WC Brown [EMAIL PROTECTED] wrote: I'm trying to spec a view but haven't done much view specing. This view render different partials depending

Re: [rspec-users] Tarball anyone

2007-10-01 Thread David Chelimsky
On 10/1/07, barsalou [EMAIL PROTECTED] wrote: Anyone willing to tar me up the 1.0.8 of rspec and rspec_on_rails? I'm interested in giving the story runner stuff a try. 1.0.8 doesn't have the story runner in it. I just posted a tar of the current trunk here:

Re: [rspec-users] how to spec views

2007-10-01 Thread David Chelimsky
, Andrew WC Brown [EMAIL PROTECTED] wrote: I had reinstalled the plugin yesterday but I reinstalled it and its revision 2680 It still gives me the error. On 10/1/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/1/07, Andrew WC Brown [EMAIL PROTECTED] wrote: 1.0.9

Re: [rspec-users] color output?

2007-10-02 Thread David Chelimsky
Not yet. Patches welcome! On 10/2/07, Jonathan Linowes [EMAIL PROTECTED] wrote: does story runner have commandline options ,eg to add color to output? ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] color output?

2007-10-02 Thread David Chelimsky
On 10/2/07, David Chelimsky [EMAIL PROTECTED] wrote: Not yet. Patches 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 commandline

[rspec-users] Rails 2.0 Preview Release and RSpec Trunk

2007-10-02 Thread David Chelimsky
Hi all, For those of you checking out the Rails 2.0 preview release: RSpec-1.0.8 does not support Rails 2.0. Unfortunately, we're in the middle of some big changes to the internals in trunk and won't be in a position to do a release for another week or so. Therefore, if you are using the Rails

Re: [rspec-users] align the runner

2007-10-02 Thread David Chelimsky
On 10/2/07, Shane Duan [EMAIL PROTECTED] wrote: I saw from the thread color output that there is a plan to align the runner. Is there a place to see what that means? I am just curious. I think that there are conversations about this on the rspec-devel list. Thus far we haven't created any

Re: [rspec-users] color output?

2007-10-02 Thread David Chelimsky
On 10/2/07, Jonathan Linowes [EMAIL PROTECTED] wrote: feature request: http://rspec.rubyforge.org/community/contribute.html http://rubyforge.org/tracker/?atid=3152group_id=797func=browse ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] Rails 2.0 Preview Release and RSpec Trunk

2007-10-02 Thread David Chelimsky
On 10/2/07, Lance Carlson [EMAIL PROTECTED] wrote: Are you saying Rspec was never meant to work with edge rails? I'm talking about a past release: RSpec-1.0.8. RSpec's trunk does a pretty good job of keeping up w/ changes in edge rails, but clearly past releases of rspec are never guaranteed to

Re: [rspec-users] align the runner

2007-10-02 Thread David Chelimsky
sense to run scenarios and examples than stories and specs). Date: Tue, 2 Oct 2007 13:06:43 -0500 From: David Chelimsky [EMAIL PROTECTED] Subject: Re: [rspec-users] align the runner To: rspec-users rspec-users@rubyforge.org Message-ID: [EMAIL PROTECTED] Content-Type: text

Re: [rspec-users] RSpec Book(s) on the radar

2007-10-05 Thread David Chelimsky
On 10/5/07, Cody P. Skidmore [EMAIL PROTECTED] wrote: I just found this one: http://tinyurl.com/3c3mfa David, are there any other RSpec books in the works? Yes! Alsak and I are writing Behaviour Driven Development in Ruby with RSpec for the Pragmatic Bookshelf. It's not yet listed on the

Re: [rspec-users] I can't make RSpec 1.0.8 run in Rails 1.2.3

2007-10-05 Thread David Chelimsky
On 10/5/07, Cody P. Skidmore [EMAIL PROTECTED] wrote: I recently installed RSpec into a new project and didn't approach the install the same way. I'm using the same version of Rails and did the following: gem install rspec ruby script/plugin install

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, Andrew WC Brown [EMAIL PROTECTED] wrote: I'm trying to spec out a render partial collection but I get the following error 2) NoMethodError in '/games/_game.rhtml should show game name' undefined method `body' for ##Class:0x316580c:0x2f1154c

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
On 10/5/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/5/07, Andrew WC Brown [EMAIL PROTECTED] wrote: Well when I saw that originally thats what I thought the response was suppose to come after the render but: ActionView::ActionViewError in '/games/_game.rhtml should show game name

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
as they are now to help you w/ that. On 10/5/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/5/07, Andrew WC Brown [EMAIL PROTECTED] wrote: Well when I saw that originally thats what I thought the response was suppose to come after the render but: ActionView::ActionViewError in '/games

Re: [rspec-users] spec'ing view render partial collection, local variable not found

2007-10-05 Thread David Chelimsky
just to spec the partial. I only have the one spec in my partial On 10/5/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/5/07, Andrew WC Brown [EMAIL PROTECTED] wrote: Well I think my biggest problem I was having was the fact that my before block was: def before

Re: [rspec-users] spec'ing views, mock_model associations

2007-10-06 Thread David Chelimsky
On 10/6/07, Andrew WC Brown [EMAIL PROTECTED] wrote: I made it pass! Glad to be of help! I just had to do some stubbing. @game = mock_model(Game, :name = 'The Battle for Blaze', :salt_grains = '500', :people = '500', :days = nil, :created_at =

Re: [rspec-users] (no subject) - rspec not running

2007-10-08 Thread David Chelimsky
On 10/8/07, Scott Taylor [EMAIL PROTECTED] wrote: On Oct 8, 2007, at 11:14 AM, Scott Taylor wrote: Just ran svn up this morning, and got this (after running ./script/ generate rspec) escher: ./script/spec spec/models/item_spec.rb Finished in 8.0e-06 seconds 0 examples, 0

Re: [rspec-users] (no subject) - rspec not running

2007-10-08 Thread David Chelimsky
On 10/8/07, Scott Taylor [EMAIL PROTECTED] wrote: On Oct 8, 2007, at 11:21 AM, David Chelimsky wrote: On 10/8/07, Scott Taylor [EMAIL PROTECTED] wrote: On Oct 8, 2007, at 11:14 AM, Scott Taylor wrote: Just ran svn up this morning, and got this (after running ./script/ generate

Re: [rspec-users] spec'in controllers request for nested routes

2007-10-08 Thread David Chelimsky
On 10/8/07, Andrew WC Brown [EMAIL PROTECTED] wrote: describe PlayersController, handling GET /saltmines/games/1/players do before do @game = mock_model(Game, :to_param = 1) @game.stub_association!(:players, :find = mock_model(Player)) end def do_get get :index, :game_id

Re: [rspec-users] spec'in controllers request for nested routes

2007-10-08 Thread David Chelimsky
' /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:75: /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:63: On 10/8/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/8/07, Andrew WC Brown [EMAIL PROTECTED] wrote: describe PlayersController

Re: [rspec-users] spec'in controllers request for nested routes

2007-10-08 Thread David Chelimsky
' /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:75: /Volumes/EXTERNAL/web/omenking.ca/spec/controllers/players_controller_spec.rb:63: On 10/8/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/8/07, Andrew WC Brown [EMAIL PROTECTED] wrote: describe PlayersController

Re: [rspec-users] (no subject) - rspec not running

2007-10-08 Thread David Chelimsky
On 10/8/07, Tom Stuart [EMAIL PROTECTED] wrote: On 8 Oct 2007, at 17:26, David Chelimsky wrote: On Oct 8, 2007, at 11:14 AM, Scott Taylor wrote: escher: ./script/spec spec/models/item_spec.rb Finished in 8.0e-06 seconds 0 examples, 0 failures ./script/spec:4:in `run': wrong number

Re: [rspec-users] stub actions that depend on the parameter

2007-10-08 Thread David Chelimsky
On 10/8/07, Scott Taylor [EMAIL PROTECTED] wrote: On Oct 8, 2007, at 2:23 PM, David Chelimsky wrote: On 10/8/07, Borja Martín [EMAIL PROTECTED] wrote: David Chelimsky escribió: On 10/8/07, Borja Martín [EMAIL PROTECTED] wrote: Hi, I'm pretty new to all related to bdd and rspec

Re: [rspec-users] Rspec Textmate bundle errors

2007-10-10 Thread David Chelimsky
On 10/10/07, Alastair Moore [EMAIL PROTECTED] wrote: Hello all, Having a problem with the Rspec textmate bundle and having quizzed the guys in #textmate to no success about the errors, I've been suggested to try you guys! When I run the Run Behaviour Description command, I get the

Re: [rspec-users] Incompatibility Issues after updating CURRENT

2007-10-11 Thread David Chelimsky
On 10/11/07, George Anderson [EMAIL PROTECTED] wrote: Hi, I'm using piston to manage rspec and rspec_on_rails in vendor/plugins. ~/work/simplify_md $ piston st vendor/plugins/ vendor/plugins/rspec (svn://rubyforge.org/var/svn/rspec/tags/CURRENT/rspec)

Re: [rspec-users] [RSpec] Question about using TextMate Bundle...

2007-10-11 Thread David Chelimsky
co .../trunk/rspec - svn co .../trunk/RSpec.tmbundle Cool? Is this ok? I'll post all my steps and error messages if I'm still having problems. Thanks again for the quick response. Mel On 10/11/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/11/07, Mel Riffe [EMAIL PROTECTED

Re: [rspec-users] Story Runner: Readability of output with multiple params

2007-10-13 Thread David Chelimsky
On 10/12/07, Tasty [EMAIL PROTECTED] wrote: Fistly, many, many thanks for RSpec and Story Runner. Minor request to improve readability of output Given a scenario item with multiple params.. Eg. And the user belongs to, Joe, Acme do |user_name, company_name| The readability of the

Re: [rspec-users] locals in partials

2007-10-14 Thread David Chelimsky
On 10/12/07, Hans de Graaff [EMAIL PROTECTED] wrote: On Fri, 2007-10-12 at 12:47 -0400, 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 } render :partial = 'pages/page_menu', :locals =

Re: [rspec-users] Story Runner: Readability of output with multiple params

2007-10-14 Thread David Chelimsky
On 10/14/07, Zach Dennis [EMAIL PROTECTED] wrote: On 10/14/07, Pat Maddox [EMAIL PROTECTED] wrote: On 10/14/07, Zach Dennis [EMAIL PROTECTED] wrote: Does it add any value to even add things like Joe and Acme into a story part? It seems like that is an implementation detail of your

Re: [rspec-users] Step matchers

2007-10-14 Thread David Chelimsky
On 10/14/07, Pat Maddox [EMAIL PROTECTED] wrote: I think we all know that the readability of steps isn't great right now, and in fact there's a very recent thread that discusses just that. It was that recent thread that prompted me to explore this a bit. The basic idea is that you define

Re: [rspec-users] Story Runner: Readability of output with multiple params

2007-10-14 Thread David Chelimsky
On 10/14/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/14/07, Zach Dennis [EMAIL PROTECTED] wrote: On 10/14/07, Pat Maddox [EMAIL PROTECTED] wrote: On 10/14/07, Zach Dennis [EMAIL PROTECTED] wrote: Does it add any value to even add things like Joe and Acme into a story part

Re: [rspec-users] Step matchers

2007-10-14 Thread David Chelimsky
On 10/14/07, Pat Maddox [EMAIL PROTECTED] wrote: On 10/14/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/14/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/14/07, Pat Maddox [EMAIL PROTECTED] wrote: I think we all know that the readability of steps isn't great right now

Re: [rspec-users] Story Runner: Two 'then' steps output as 'then..and' :)

2007-10-15 Thread David Chelimsky
On 10/15/07, Andy Watts [EMAIL PROTECTED] wrote: Maybe I'm slow, but I just noticed that the following code.. When 'I login' When 'I do something else' You're encouraged to write this as: When 'I login' And 'I do something else' Cheers, David ...will output as... When 'I login' And

Re: [rspec-users] Step matchers

2007-10-15 Thread David Chelimsky
On 10/15/07, Tom Stuart [EMAIL PROTECTED] wrote: On 15 Oct 2007, at 10:25, Wincent Colaiuta wrote: - The customer/client (not necessarily with any programming knowledge) writes the stories in a format which is (almost) plain text. - The developer then writes custom step matchers; where do

Re: [rspec-users] Step matchers

2007-10-15 Thread David Chelimsky
On 10/15/07, Alvin Schur [EMAIL PROTECTED] wrote: Message: 7 Date: Sun, 14 Oct 2007 18:04:33 -0500 From: David Chelimsky [EMAIL PROTECTED] Subject: Re: [rspec-users] Step matchers To: rspec-users rspec-users@rubyforge.org Message-ID: [EMAIL PROTECTED] Content-Type: text/plain

Re: [rspec-users] Top Quoting?

2007-10-15 Thread David Chelimsky
On 10/15/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: Some prefer top-posting, others bottom-posting (I fall into this latter group), but I think that whichever way people decide to go, they would do us all a great service by trimming down the quoted section to only the relevant parts.

Re: [rspec-users] Step matchers

2007-10-15 Thread David Chelimsky
On 10/15/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: If the conventions are kept reasonably tight then this concern could be largely ameliorated with a good automated tool for generating an .rb file from an .story file, or updating an existing .rb file from an updated .story file. So, for

Re: [rspec-users] Step matchers

2007-10-15 Thread David Chelimsky
On 10/15/07, Zach Dennis [EMAIL PROTECTED] wrote: What are your thoughts about using symbol identifiers rather then question marks? I think this increases readability and gets rid of ambiguity at least for me. step a user named :username do |username| end I think that I'm leaning

Re: [rspec-users] Step matchers

2007-10-15 Thread David Chelimsky
On 10/15/07, James Hughes [EMAIL PROTECTED] wrote: On 10/15/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: I really think it's important that this thing, whatever it ends up looking like, be nice for programmers to use, not just programmer's customers. +1 I think what we're proposing

Re: [rspec-users] Failure trying to test ApplicationController

2007-10-15 Thread David Chelimsky
On 10/15/07, Steve [EMAIL PROTECTED] wrote: I'm trying to write some tests for the ApplicationController as shared tests that can be run in all of my other controller tests, but am getting a nil.rewrite error. Below is what I have... describe AccountController do it_should_behave_like

Re: [rspec-users] Failure trying to test ApplicationController

2007-10-15 Thread David Chelimsky
On 10/15/07, Steve [EMAIL PROTECTED] wrote: I'm trying to write some tests for the ApplicationController as shared tests that can be run in all of my other controller tests, but am getting a nil.rewrite error. Below is what I have... describe AccountController do it_should_behave_like

Re: [rspec-users] Failure trying to test ApplicationController

2007-10-16 Thread David Chelimsky
On 10/16/07, Steve [EMAIL PROTECTED] wrote: On Tue, 16 Oct 2007 00:26:13 -0500, David Chelimsky wrote: Part of the problem is that you're trying to spec something that already exists. Developing spec-first, you wouldn't likely end up with this problem because this method would have appeared

Re: [rspec-users] RailsStory runner - empty response

2007-10-16 Thread David Chelimsky
On 10/16/07, Alvin Schur [EMAIL PROTECTED] wrote: Alvin Schur wrote: On 10/16/07, Alvin Schur [EMAIL PROTECTED] wrote: I generated a new rails app then installed rspec and rspec_on_rails from trunk. I then created a sample story: require File.dirname(__FILE__) + /helper

Re: [rspec-users] Example for attr_accessible?

2007-10-16 Thread David Chelimsky
On 10/16/07, Pat Maddox [EMAIL PROTECTED] wrote: describe Chicken do it should make only :name and :age attr_accessible do Chicken.should_receive(:attr_accessible).with(:name, :age) load #{RAILS_ROOT}/app/models/chicken.rb end end I first saw this technique described by David

Re: [rspec-users] Spec dirs not in path?

2007-10-16 Thread David Chelimsky
On 10/16/07, Steve [EMAIL PROTECTED] wrote: I'm just curious if there's a reason why rspec doesn't add the various spec dirs to $: so that requires can be done without specifying the full path name. Do you mean the dirs inside rspec, or in the spec directory in your project?

Re: [rspec-users] (no subject) - rspec not running

2007-10-16 Thread David Chelimsky
On 10/16/07, Steven Garcia [EMAIL PROTECTED] wrote: I am getting this same error when I run autotest. There are a few errors cited in this thread. Which one do you mean? My system specs Rails v7945 Rspec Version 1.1.0 (in SVN) OS 10.4.10 ___

Re: [rspec-users] (no subject) - rspec not running

2007-10-16 Thread David Chelimsky
On 10/16/07, Steven Garcia [EMAIL PROTECTED] wrote: I just unfroze my app and am getting the same error. Gonna reinstall a stable rspec to make sure that the trunk is really the issue Try script/generate rspec first :) ___ rspec-users mailing list

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

2007-10-16 Thread David Chelimsky
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 controller spec. I get the following failure on each 6 when I run it via $ rake spec Do you have --reverse in your

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

2007-10-17 Thread David Chelimsky
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 so that you can write access the data in your account and write

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

2007-10-17 Thread David Chelimsky
On 10/17/07, Jonathan Linowes [EMAIL PROTECTED] wrote: 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

Re: [rspec-users] Any tips on teaching BDD with RSpec?

2007-10-17 Thread David Chelimsky
On 10/17/07, Pat Maddox [EMAIL PROTECTED] wrote: I think you'll BOTH learn more and be far more efficient if you pair together rather than giving him a bit of theory/tips tricks and then leaving him to his own devices. Hear, hear!!! ___

Re: [rspec-users] Any tips on teaching BDD with RSpec?

2007-10-17 Thread David Chelimsky
generally) What's the best book on the subject for someone in my situation? Behaviour Driven Development in Ruby with RSpec by David Chelimsky and Aslak Hellesoy Sadly, not yet in print, but coming soon from the Pragmatic Bookshelf. In the mean time, you might want to give this one a peek: http

Re: [rspec-users] rspec causing validates_presence_of to validate twice?

2007-10-17 Thread David Chelimsky
Versions? RSpec? Rails? On 10/17/07, Steve [EMAIL PROTECTED] wrote: I had posted this on the regular Rails list, but upon trying this in script/console, it seems like the behavior only exists when running rspec. I'm getting some weird behavior in one of my models. I have a model defined

Re: [rspec-users] Any tips on teaching BDD with RSpec?

2007-10-17 Thread David Chelimsky
On 10/17/07, Shane Mingins [EMAIL PROTECTED] wrote: On 18/10/2007, at 8:54 AM, David Chelimsky wrote: Behaviour Driven Development in Ruby with RSpec by David Chelimsky and Aslak Hellesoy Sadly, not yet in print, but coming soon from the Pragmatic Bookshelf. Will it be released

Re: [rspec-users] rspec causing validates_presence_of to validate twice?

2007-10-17 Thread David Chelimsky
On 10/17/07, Steve [EMAIL PROTECTED] wrote: On Wed, 17 Oct 2007 15:41:19 -0500, David Chelimsky wrote: Please update to the latest rspec trunk and try again. I think this is due to a bug that was resolved in the 2718 (believe it or not). Just updated and am at 2719. The problem still

Re: [rspec-users] rspec causing validates_presence_of to validate twice?

2007-10-17 Thread David Chelimsky
On 10/17/07, Steve [EMAIL PROTECTED] wrote: I'm running through rake(rake spec:models to be exact). The error is: 'User should be invalid without a password when creating' FAILED expected: can't be blank, got: [can't be blank, can't be blank] (using ==) ./spec/models/user_spec.rb:64:

Re: [rspec-users] rspec causing validates_presence_of to validate twice?

2007-10-17 Thread David Chelimsky
On 10/17/07, Steve [EMAIL PROTECTED] wrote: On Wed, 17 Oct 2007 16:40:11 -0500, David Chelimsky wrote: Would you please try running it like this: script/spec spec -b and this script/spec spec/models/user_spec.rb -b and let us know if it's still happening? script/spec spec -b

Re: [rspec-users] rspec causing validates_presence_of to validate twice?

2007-10-17 Thread David Chelimsky
On 10/17/07, Steve [EMAIL PROTECTED] wrote: Also I really don't think I'm leaking state. I have before(:each) statements in my describes that basically create new instances of the object as required for that behavior. So they are fresh each time, correct? Further, even though rails clears

Re: [rspec-users] rspec causing validates_presence_of to validate twice?

2007-10-17 Thread David Chelimsky
On 10/17/07, Steve [EMAIL PROTECTED] wrote: On Wed, 17 Oct 2007 21:31:19 -0500, David Chelimsky wrote: This all may be true but I can't help you diagnose the problem without looking at the code. If you'd kindly pastie the spec and model, I'll be glad to look at them. Otherwise I'm just

[rspec-users] first cut at blockless given/when/then

2007-10-18 Thread David Chelimsky
Hi all, I committed a first cut at blockless Givens/Whens/Thens to RSpec's trunk: cd /path/to/rspec/project svn up cd rspec bin/spec examples/story/calculator.rb Take a look at examples/story/calculator.rb to see what's going on. Needs docs Thoughts welcome. I've also got a cut at the

Re: [rspec-users] RSPec and rails 2.0 plan

2007-10-18 Thread David Chelimsky
On 10/18/07, Cyril Ucron David [EMAIL PROTECTED] wrote: Hello all, I'm just wondering what the overall game plan is here. Right now when I use rails 2.0 pre release with rspec trunk, I run into a LOT of problems (lot is not an understatement here). We've got trunk passing all specs against

Re: [rspec-users] first cut at blockless given/when/then

2007-10-18 Thread David Chelimsky
On 10/18/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: El 18/10/2007, a las 10:33, David Chelimsky [EMAIL PROTECTED] escribió: Take a look at examples/story/calculator.rb to see what's going on. Needs docs Thoughts welcome. Could this: step_matcher(:given, an addend

Re: [rspec-users] first cut at blockless given/when/then

2007-10-18 Thread David Chelimsky
On 10/18/07, Pat Maddox [EMAIL PROTECTED] wrote: On 10/18/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/18/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: El 18/10/2007, a las 10:33, David Chelimsky [EMAIL PROTECTED] escribió: Take a look at examples/story/calculator.rb to see

Re: [rspec-users] first cut at blockless given/when/then

2007-10-18 Thread David Chelimsky
On 10/18/07, Pat Maddox [EMAIL PROTECTED] wrote: step_matchers(arithmetic) do given_matcher(an addend of $addend) do |addend| @adder ||= Adder.new @adder addend.to_i end when_matcher(they are added) do @sum = @adder.sum end then_matcher(the sum should be $sum) do |sum|

Re: [rspec-users] first cut at blockless given/when/then

2007-10-18 Thread David Chelimsky
On 10/18/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: El 18/10/2007, a las 18:42, David Chelimsky [EMAIL PROTECTED] escribió: Easier to type, sure. I'm not in love w/ the names yet though because they sound like verb phrases - given matcher, when matcher, then matcher. How about

Re: [rspec-users] Assumption tests

2007-10-19 Thread David Chelimsky
of this briefly on #rspec with David (chelimsky) (I'm swombat), but would love more opinions about it, and it seems that all the fun stuff happens on the mailing list :-) Thanks for any feedback, Daniel http://www.inter-sections.net/ (swombat on freenode#rspec

Re: [rspec-users] Patch idea for rspec_on_rails

2007-10-19 Thread David Chelimsky
On 10/19/07, Ben Mabey [EMAIL PROTECTED] wrote: David Chelimsky wrote: On 10/19/07, Ben Mabey [EMAIL PROTECTED] wrote: I would think that something like this should be worked into rpsec_on_rails. Because it makes testing AR behavior very easy and painless. One line of code = One line

Re: [rspec-users] first cut at blockless given/when/then

2007-10-19 Thread David Chelimsky
On 10/19/07, Wincent Colaiuta [EMAIL PROTECTED] wrote: Another alternative combining your suggestion with what Pat mentioned: step_matchers do |match| match.given ... match.when ... match.then ... end That's nice, except we don't want methods named when and then as

Re: [rspec-users] Feeding the framework ?

2007-10-18 Thread David Chelimsky
On 10/18/07, David Chelimsky [EMAIL PROTECTED] wrote: On 10/18/07, Keith McDonnell [EMAIL PROTECTED] wrote: Hi there, Is it just me or do many other rspec / rpsec_on_rails users spend more time than they would like feeding the framework ? Don't get me wrong, I love rpsec, but I seem

Re: [rspec-users] Feeding the framework ?

2007-10-18 Thread David Chelimsky
On 10/18/07, Keith McDonnell [EMAIL PROTECTED] wrote: Hi there, Is it just me or do many other rspec / rpsec_on_rails users spend more time than they would like feeding the framework ? Don't get me wrong, I love rpsec, but I seem to spend about 2/3 hours per week hunting down rspec

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

2007-10-20 Thread David Chelimsky
On 10/20/07, Russell Norris [EMAIL PROTECTED] wrote: i'm having problem with a form_for situation where i'm trying to DRY out the repeated parts of my forms and put them in common/form and render the form elements via another partial in controller_name/_form. Here's the first form #

Re: [rspec-users] TextMate bundle in MacroMates repo

2007-10-20 Thread David Chelimsky
On 10/20/07, Ashley Moran [EMAIL PROTECTED] wrote: Hi Recently I sent a modified version of the GetBundle bundle to textmate-dev. It was failing because the RSpec bundle was from another repo (ie RubyForge). One of the replies said that the RSpec bundle was now in the MacroMates repo,

Re: [rspec-users] Assumption tests

2007-10-20 Thread David Chelimsky
On 10/20/07, Pat Maddox [EMAIL PROTECTED] wrote: On 10/19/07, Scott Taylor [EMAIL PROTECTED] wrote: Following up on the last idea: One thing that I don't think is yet widely understood is that there is no such thing as a unit or integration test - test happen on a continuum (the

Re: [rspec-users] Assumption tests

2007-10-20 Thread David Chelimsky
On 10/20/07, Daniel Tenner [EMAIL PROTECTED] wrote: On 20 Oct 2007, at 17:34 20 Oct 2007, David Chelimsky wrote: The distinction we make between stories and specs is that stories describe how a system behaves in terms of a user's experience, whereas specs describe how an object behaves

Re: [rspec-users] Using unit_record and rspec (previously Keeping unit tests from hitting the DB)

2007-10-20 Thread David Chelimsky
On 10/20/07, Tim Heighes [EMAIL PROTECTED] wrote: Back in August David Chelimsky wrote: FYI - I tried using the unit_record gem and there are some changes required in rspec to make it work, but they are trivial and it works great. The only trick is that the prevention of DB access is global

Re: [rspec-users] Assumption tests

2007-10-20 Thread David Chelimsky
On 10/20/07, Scott Taylor [EMAIL PROTECTED] wrote: These two specs are basically the same, and I can tell you that I would likely NOT write the first one, but I would very likely write the second one. This means that my decision is based on the implementation, which might bug our purist

<    1   2   3   4   5   6   7   8   9   10   >