Re: [rspec-users] should_receive twice and arguments

2008-01-13 Thread David Chelimsky
On Jan 13, 2008 6:56 AM, Ivo Dancet [EMAIL PROTECTED] wrote: Hi all, I have a method calling Klass.create! two times with different arguments (this happens in a class reponsable for reading in a csv file) I want to test those like this: in one test: Klass.should_receive(:create!).with(:name

Re: [rspec-users] .html.erb files and autotest

2008-01-13 Thread David Chelimsky
On Jan 13, 2008 3:51 PM, Corey Haines [EMAIL PROTECTED] wrote: When I work with a .html.erb file, the autotest rspec on rails stuff doesn't understand the file to map it to the right test. I wanted to submit a patch for this, but I'm unsure where the specs would be to update. I found the

Re: [rspec-users] .html.erb files and autotest

2008-01-13 Thread David Chelimsky
PROTECTED] wrote: Okay, thanks. On Jan 13, 2008 4:54 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Jan 13, 2008 3:51 PM, Corey Haines [EMAIL PROTECTED] wrote: When I work with a .html.erb file, the autotest rspec on rails stuff doesn't understand the file

Re: [rspec-users] .html.erb files and autotest

2008-01-14 Thread David Chelimsky
On Jan 14, 2008 6:46 PM, Kero van Gelder [EMAIL PROTECTED] wrote: The benefit of doing that is it spots files that you may not have spec'd that you want spec'd. On the flip side you end up with a bunch of noise but you can eliminate that w/ the :initialize hook: Autotest.add_hook

Re: [rspec-users] Okay, I'm finally asking for help

2008-01-14 Thread David Chelimsky
On Jan 14, 2008 8:31 PM, Corey Haines [EMAIL PROTECTED] wrote: Hi, all! I would love if someone could help me figure this out. I can't seem to see why the following fails: Here's the spec: it should redirect back to the index page do Coupon.should_receive

Re: [rspec-users] broken URL on rspec.info

2008-01-15 Thread David Chelimsky
On Jan 15, 2008 8:27 AM, Cody P. Skidmore [EMAIL PROTECTED] wrote: Hey folks. I was looking for the mailing list archive up on rspec.info. I clicked on the community link and received the URL http://ey01-s00414/community/;. This isn't correct, obviously. The hint shows it as,

Re: [rspec-users] unusual challenges speccing external software

2008-01-17 Thread David Chelimsky
On Jan 17, 2008 11:33 AM, Giles Bowkett [EMAIL PROTECTED] wrote: Giles - I think you'll find more people with more experience in this area on the [EMAIL PROTECTED] list. That said, and only having glanced at your mail, here's a thought or two: The TDD line on this, as I understand it, is

Re: [rspec-users] Rspec problem in testing RoR application

2008-01-18 Thread David Chelimsky
On Jan 18, 2008 3:57 AM, Anton Komarov [EMAIL PROTECTED] wrote: Hello. I install gems rspec and rspec_on_rails For rails, don't use the gem. Install both as plugins: http://rspec.info/documentation/rails/install.html I have this Error when try to run Rspec tests on my RoR application:

Re: [rspec-users] session data and user stories

2008-01-18 Thread David Chelimsky
On Jan 16, 2008 4:59 PM, Evan Short [EMAIL PROTECTED] wrote: hello there, i have been trying my hand at this rbehave material, specifically in terms of integration testing a rails application, and i am curious about the most friendly way to deal with session data. currently, the only way i

Re: [rspec-users] should_not == vs should !=

2008-01-18 Thread David Chelimsky
On Jan 18, 2008 10:47 PM, David James [EMAIL PROTECTED] wrote: describe should_not == vs. should != it do 5.should_not == 6 end # passes it do 5.should != 6 end # fails end # I'm running the rspec 1.1.2 gem with the corresponding Textmate bundle # The second failure

Re: [rspec-users] autotest problem?

2008-01-19 Thread David Chelimsky
so I'm not going to be able to help you debug that - but why don't you try killing these for a moment and see if everything works fine. $VERBOSE=false -Corey On Jan 19, 2008 12:47 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Jan 19, 2008 11:41 AM, Corey Haines [EMAIL PROTECTED

[rspec-users] new --pattern option

2008-01-20 Thread David Chelimsky
Hello all, Just a heads up that I made a change (in svn trunk - not yet released) that may change what files get loaded when you run the rake or spec commands. Not a big deal if you've been following convention, but for those who haven't you may need to make a minor adjustment to your rake file

Re: [rspec-users] should_not == vs should !=

2008-01-21 Thread David Chelimsky
On Jan 21, 2008 8:22 AM, Jim Lindley [EMAIL PROTECTED] wrote: I'm 99 44/100% sure that you have it right. The expression x != y is syntactic sugar for !(x == y) much like x += y is syntactic sugar for x = (x +y) The parser turns these into an internal representation (abstract syntax

Re: [rspec-users] attachment_fu and story runner, any updates

2008-01-21 Thread David Chelimsky
On Jan 21, 2008 2:12 PM, Rick DeNatale [EMAIL PROTECTED] wrote: I'm trying to write a story for a Rails app which involves using the attachment_fu plugin to upload images. After blunting my pick on this for a while, google found me this: http://www.ruby-forum.com/topic/134743#600831 So it

Re: [rspec-users] Not seeing the failure

2008-01-23 Thread David Chelimsky
AM, David Chelimsky [EMAIL PROTECTED] wrote: On Jan 23, 2008 8:41 AM, Corey Haines [EMAIL PROTECTED] wrote: All, I'm missing something simple, I think. I am writing a spec to say that my CouponController should create a new coupon from the form parameters, then set

Re: [rspec-users] Not seeing the failure

2008-01-23 Thread David Chelimsky
. I'm going to write up a blog entry on this pattern, and I'll send a link when I post it. Thanks for your help. -Corey On Jan 23, 2008 10:03 AM, David Chelimsky [EMAIL PROTECTED] wrote: On Jan 23, 2008 8:49 AM, Corey Haines [EMAIL PROTECTED] wrote: Of course. Thanks, David! I still

Re: [rspec-users] DRYing up stories

2008-01-24 Thread David Chelimsky
On Jan 24, 2008 3:47 AM, Kamal Fariz [EMAIL PROTECTED] wrote: With 1.1.1 you can do this: Given $n_users in the system do |num_users| case num_users when a user # one user case when /(\d*) users/ # multi user case using $1 end end With 1.1.2 you can do this:

Re: [rspec-users] Meridian case

2008-01-24 Thread David Chelimsky
On Jan 24, 2008 5:40 AM, Keith McDonnell [EMAIL PROTECTED] wrote: Hi there, I have a *really* weird issue with rspec on rails: Given a time meridian formatted using %p When I run `rake spec` the time meridian is converted to lower case: expected: Today 08:00 PM, got: Today 08:00 pm

Re: [rspec-users] Constant definition matcher

2008-01-24 Thread David Chelimsky
On Jan 24, 2008 8:56 AM, Nicolas Jacobeus [EMAIL PROTECTED] wrote: Hello all, I need to specify that a class should define a constant. I couldn't find something such as should define_const('MY_CONST') in the RSpec documentation, even though there are similar matchers such as should

Re: [rspec-users] expect_render(...).and_return('x')

2008-01-25 Thread David Chelimsky
On Jan 23, 2008 5:25 AM, Rob Holland [EMAIL PROTECTED] wrote: Hi, I'm trying to spec a controller method which renders some rjs as part of a render :update block. The problem I'm having is that stub_render or expect_render don't seem to allow and_return to work. The controller method does:

Re: [rspec-users] expect_render(...).and_return('x')

2008-01-25 Thread David Chelimsky
On Jan 25, 2008 7:19 AM, Rob Holland [EMAIL PROTECTED] wrote: David, Thanks for looking at the problem. The trick here is that render :partial is NOT getting called on the controller - it's getting called on the template that is yielded to render :update. I think I follow, still

Re: [rspec-users] OT local version control?

2008-01-27 Thread David Chelimsky
On Jan 27, 2008 3:33 PM, Corey Haines [EMAIL PROTECTED] wrote: Hi, all, This isn't about rspec, but this list has people whose opinions I respect. So, I'm looking for a new version control system for my local development. I was going to install subversion, but I've heard rumors of people

Re: [rspec-users] route_for and nested resources

2008-01-27 Thread David Chelimsky
On Jan 27, 2008 6:27 PM, Matt Darby [EMAIL PROTECTED] wrote: Chris Olsen wrote: I can't figure out how to make the updates to allow for the route_form method to return a url that matches the expected. Sorry to bump such an old post, but the interweb doesn't really show anything for

Re: [rspec-users] route_for and nested resources

2008-01-27 Thread David Chelimsky
On Nov 21, 2007 3:10 PM, Chris Olsen [EMAIL PROTECTED] wrote: I can't figure out how to make the updates to allow for the route_form method to return a url that matches the expected. Here is a sample route_for(:controller = :task, :action = :new).should == /task/new If a task has to be

Re: [rspec-users] route_for and nested resources

2008-01-27 Thread David Chelimsky
- any ideas on how to make that happen? On Jan 27, 2008, at 8:26 PM, Matt Darby wrote: On Jan 27, 2008, at 8:05 PM, David Chelimsky wrote: On Nov 21, 2007 3:10 PM, Chris Olsen [EMAIL PROTECTED] wrote: Or do you just use: new_user_task(1,1).should == /users/1/task/new

Re: [rspec-users] catching errors, rspec basics

2008-01-29 Thread David Chelimsky
On Jan 29, 2008 6:55 PM, Andrew WC Brown [EMAIL PROTECTED] wrote: try it, does the same thing ='( Shouldn't be the exact same thing. What's the whole error? Also - what version of rspec? If trunk, do you have the latest (3268)? On Jan 29, 2008 7:49 PM, Shane Mingins [EMAIL PROTECTED]

Re: [rspec-users] Autotest with RSpec Rails and Engines

2008-01-30 Thread David Chelimsky
On Sep 25, 2007 4:16 AM, Shane Mingins [EMAIL PROTECTED] wrote: Hi We have a Rails project using an engine which I want to run autotest with rspec against. So the project specific specs are in the specs directory but the common specs are in the specs directory of the engine plugin (e.g.

Re: [rspec-users] Autotest with RSpec Rails and Engines

2008-01-30 Thread David Chelimsky
On Jan 30, 2008 4:16 PM, lfeistel [EMAIL PROTECTED] wrote: I am also running into nearly this same issue. I am using NetBeans with autotest as I am developing a new Engine Plugin. I would like the tests for the Engine to live in the plugin's spec directory. But it seems that the only way to

[rspec-users] ZenTest-3.9.0 incompatible with RSpec-1.1.2

2008-01-31 Thread David Chelimsky
Hey all, Just a heads up that the ZenTest-3.9.0 release is not compatible with RSpec-1.1.2. I thought I had a release ready to go, but differences between a preview release of ZenTest that I received and the actual release seem to have broken compatibility. We'll get this resolved soon, but in

Re: [rspec-users] ZenTest-3.9.0 incompatible with RSpec-1.1.2

2008-01-31 Thread David Chelimsky
On Jan 31, 2008 9:19 AM, David Chelimsky [EMAIL PROTECTED] wrote: This is resolved with the RSpece-1.1.3 release which went out early this morning. So early that I can't spell :) On Jan 31, 2008 5:25 AM, David Chelimsky [EMAIL PROTECTED] wrote: Hey all, Just a heads up

Re: [rspec-users] ZenTest-3.9.0 incompatible with RSpec-1.1.2

2008-01-31 Thread David Chelimsky
This is resolved with the RSpece-1.1.3 release which went out early this morning. On Jan 31, 2008 5:25 AM, David Chelimsky [EMAIL PROTECTED] wrote: Hey all, Just a heads up that the ZenTest-3.9.0 release is not compatible with RSpec-1.1.2. I thought I had a release ready to go

[rspec-users] BDD and TDD (was Newbie question with rspec on rails)

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 1:20 AM, Pat Maddox [EMAIL PROTECTED] wrote: For some info on why BDD kicks TDD's butt ... Woah! I find this deeply disturbing. I believe your heart is in the right place here, so please don't take this as a personal attack, but this statement reflects a view that I see expressed

Re: [rspec-users] Problems with plugins?

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 12:57 PM, Lance Ball [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi there I've run into a bit of a problem that I can't seem to figure out. I have a model class User which includes our acts_as_role_context library. This lib acts like most other

Re: [rspec-users] Trouble testing a method with loop

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 5:24 AM, David Currin [EMAIL PROTECTED] wrote: I'm having trouble working out how to test a method that contains a loop. I'm new to rspec so not sure what the best way is to tackle this. class Company ActiveRecord::Base def self.sync_with_basecamp companies =

Re: [rspec-users] Problems with plugins?

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 1:52 PM, Lance Ball [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Feb 4, 2008, at 2:34 PM, David Chelimsky wrote: On Feb 4, 2008 12:57 PM, Lance Ball [EMAIL PROTECTED] wrote: When #add_user_to_role is called in the controller during my spec

Re: [rspec-users] Mock objects not getting unloaded between specs

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 2:51 PM, Nate Clark [EMAIL PROTECTED] wrote: I'm having a frustrating experience with a mock object in one example (a Rails controller test) interfering with an actual model test in a subsequent model example. More specifically, I have spec/controllers/section_controller_spec.rb

Re: [rspec-users] rspec - rails put :update any examples

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 9:44 PM, Brian Rowe [EMAIL PROTECTED] wrote: I'm looking for a working example of a put :update on a controller. The documentation online avoids the update function. Any help pointing to this example would be great. Trying to get to 100% coverage...can't make it without

Re: [rspec-users] Spec::Runner.register_at_exit_hook in RSpec 1.1.3

2008-02-04 Thread David Chelimsky
On Feb 4, 2008 11:15 PM, Steve Hayes [EMAIL PROTECTED] wrote: In RSpec 1.1.3 this method is invoked from Spec::Example::ExampleGroupMethods.inherited, but it no longer exists. It most certainly does. In fact, it's new in 1.1.3, so neither the method nor the call existed prior. Any chance you

Re: [rspec-users] rspec - rails put :update any examples

2008-02-05 Thread David Chelimsky
want this level of coverage and isolation. FWIW, David On Feb 5, 2008 2:02 AM, David Chelimsky [EMAIL PROTECTED] wrote: it should replace foo with bar partial do page = mock(page) page.should_receive(:replace_html).with('foo', :partial = 'bar') controller.expect_render(:update

Re: [rspec-users] Problems testing rss feed controller.

2008-02-07 Thread David Chelimsky
On Feb 7, 2008 2:27 PM, Rick DeNatale [EMAIL PROTECTED] wrote: I've got a controller which produces an RSS feed, pretty much based on Ryan Bates recent RailsCast. I'm having a heck of a time getting the spec to successfully fetch the feed though. I gave up got it working without a spec, and

Re: [rspec-users] Shared examples not reloading in spec_server

2008-02-07 Thread David Chelimsky
On Feb 7, 2008 9:39 AM, Charles Grindel [EMAIL PROTECTED] wrote: I am currently running RSpec 1.1.3 with ZenTest 3.9.1 on Windows XP. I have noticed that shared examples are not being reloaded by spec_server when they have been updated. Below is a simple example that reproduces the problem.

Re: [rspec-users] Can you explain this code to me?

2008-02-07 Thread David Chelimsky
On Feb 7, 2008 5:26 PM, Pito Salas [EMAIL PROTECTED] wrote: I am experimenting with the restful-authentication plug in and I see that it has generated an rspec encantation which I had not seen before: it 'allows signup' do lambda do create_user response.should be_redirect

Re: [rspec-users] colored output for stories?

2008-02-11 Thread David Chelimsky
On Feb 11, 2008 6:41 AM, Neil M. Young [EMAIL PROTECTED] wrote: aslak hellesoy wrote: On Feb 8, 2008 9:50 PM, Neil M. Young [EMAIL PROTECTED] wrote: sorry if this is documented somewhere, but do stories support colored output? neither -c nor --color are working for me. It works

Re: [rspec-users] params are making my should redirect_to test fail - why??

2008-02-13 Thread David Chelimsky
On Feb 13, 2008 12:26 PM, Max Williams [EMAIL PROTECTED] wrote: I'm testing a controller action that redirects to a different action/view, sending through some params. In my test, i'm only specifying the controller and action that it should redirect to, but the additional params are making

Re: [rspec-users] How do I mock out the before :login_required method?

2008-02-13 Thread David Chelimsky
On Feb 13, 2008 6:03 PM, Wes Shaddix [EMAIL PROTECTED] wrote: Jarkko Laine wrote: On 13.2.2008, at 5.12, Wes Shaddix wrote: I have a GroupController class that inherits from a SecuredController which have a before filter (before_filter :login_required). This is using the restul

Re: [rspec-users] How do I mock out the before :login_required method?

2008-02-13 Thread David Chelimsky
On Feb 13, 2008 6:24 PM, Wes Shaddix [EMAIL PROTECTED] wrote: David Chelimsky wrote: On Feb 13, 2008 6:03 PM, Wes Shaddix [EMAIL PROTECTED] wrote: Jarkko Laine wrote: On 13.2.2008, at 5.12, Wes Shaddix wrote: I have a GroupController class that inherits from a SecuredController

Re: [rspec-users] params are making my should redirect_to test fail - why??

2008-02-14 Thread David Chelimsky
On Thu, Feb 14, 2008 at 9:48 AM, Rick DeNatale [EMAIL PROTECTED] wrote: On 2/14/08, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Feb 14, 2008 at 8:22 AM, Rick DeNatale [EMAIL PROTECTED] wrote: On 2/14/08, Max Williams [EMAIL PROTECTED] wrote: I've been looking

Re: [rspec-users] params are making my should redirect_to test fail - why??

2008-02-14 Thread David Chelimsky
data in the object but it's private. thanks max On 13/02/2008, David Chelimsky [EMAIL PROTECTED] wrote: On Feb 13, 2008 12:26 PM, Max Williams [EMAIL PROTECTED] wrote: I'm testing a controller action that redirects to a different action/view, sending through some params. In my test

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread David Chelimsky
I found the source of the problem and I'm working on a fix. On Thu, Feb 14, 2008 at 11:16 PM, Steve [EMAIL PROTECTED] wrote: On Fri, 15 Feb 2008 08:57:32 +0800, Kamal Fariz wrote: I got this too, but didn't bother to find out where and how script/ spec would sneak into the list of files

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread David Chelimsky
The source of the bug was a patch that we applied a while back. This was after the 1.1.3 release, so if you're using 1.1.3 you're fine. If you're using trunk, go ahead and update and you should be fine now. On Fri, Feb 15, 2008 at 12:31 AM, David Chelimsky [EMAIL PROTECTED] wrote: I found

Re: [rspec-users] can't get (r)spec to work in non-rails project

2008-02-16 Thread David Chelimsky
to believe such a thing? Op 16-feb-08, om 14:59 heeft David Chelimsky het volgende geschreven: On Feb 16, 2008 8:51 AM, Ivo Dancet [EMAIL PROTECTED] wrote: Hi I can't seem to get rspec and autotest to work in a small test project. The spec command doesn't load the implementation file

Re: [rspec-users] Run all tests after success

2008-02-16 Thread David Chelimsky
On Feb 16, 2008 1:21 PM, Steve [EMAIL PROTECTED] wrote: On Sat, 16 Feb 2008 18:13:51 +, Steve wrote: What was the nature of the changes. I just updated to r3312, and when I run autotest I get: loading autotest/rails_rspec /usr/bin/ruby1.8 -S script/spec -O spec/spec.opts all the

Re: [rspec-users] can't get (r)spec to work in non-rails project

2008-02-16 Thread David Chelimsky
On Feb 16, 2008 1:56 PM, Ivo Dancet [EMAIL PROTECTED] wrote: Op 16-feb-08, om 19:26 heeft Steve het volgende geschreven: On Sat, 16 Feb 2008 13:06:00 -0500, David Chelimsky wrote: The rspec/rails plugin works because there are generators which create the files for you, not because

Re: [rspec-users] #describe behavior with a module

2008-02-16 Thread David Chelimsky
On Feb 16, 2008 5:19 PM, Gary Wright [EMAIL PROTECTED] wrote: Consider: module X def initialize(a) super() end end describe X do it is a module do X.should be_instance_of(Module) end end This generates an error because #describe tries to include X into the

Re: [rspec-users] #describe behavior with a module

2008-02-17 Thread David Chelimsky
On Feb 17, 2008 12:59 AM, Gary Wright [EMAIL PROTECTED] wrote: On Feb 16, 2008, at 6:10 PM, David Chelimsky wrote: That was done initially to support Rails helper specs. As it turns out, I usually wrap add a #helper method that returns self in those cases to make it explicit. So I'm

Re: [rspec-users] uh... fixtures?

2008-02-17 Thread David Chelimsky
On Feb 17, 2008 10:30 PM, Phlip [EMAIL PROTECTED] wrote: s/pdi/pid Funny that the typo should lead you to PDI :) Oh kewt, but that's copied live out of a passing Beast test. (You know - always clone a working test when branching in a new direction..): /beast/stable-1.0/test/fixtures$

Re: [rspec-users] uh... fixtures?

2008-02-17 Thread David Chelimsky
On Feb 17, 2008 9:49 PM, Phlip [EMAIL PROTECTED] wrote: RSpec-ers: I'm aware this is quite the FAQ. I have probably asked it myself, but I just can't Google up anything but others asking it. I grabbed the source to Beast, to use as a Rails project uninfluenced by me, or RSpec. Then I

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 8:43 AM, Max Williams [EMAIL PROTECTED] wrote: ah yes of course :) So, now, should_not be_success passes ok, but should i be more specific and require a particular error code? If so, which would i get from a get call that's failed because of a RuntimeError exception? You

Re: [rspec-users] Problem with testing for an exception from a controller method

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 8:46 AM, Corey Haines [EMAIL PROTECTED] wrote: 500? That's internal server error. You could set up an expectation for the return, using a code you know isn't right (200?), then see what the actual value is after you get the failing test. What he said :) On Feb 18, 2008

Re: [rspec-users] File loading bug

2008-02-18 Thread David Chelimsky
On Feb 18, 2008 4:59 PM, Steve [EMAIL PROTECTED] wrote: Not sure if this is rspec or autotest. When autotest is running, and I add new files in my rails project, it doesn't notice. I have to restart autotest for it to start seeing them. Not the end of the world, just a small inconvenience.

Re: [rspec-users] render_to_string in a controller test?

2008-02-19 Thread David Chelimsky
On Feb 18, 2008 8:10 PM, EAW [EMAIL PROTECTED] wrote: Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don't test views etc. However, I think I've run into a situation that might be an exception. My controller uses render_to_string to

Re: [rspec-users] spec_server requiring absolute paths (and autotest breaking)

2008-02-19 Thread David Chelimsky
On Feb 19, 2008 10:42 AM, Jarkko Laine [EMAIL PROTECTED] wrote: rspec and rspec_on_rails rev 3316, ZenTest 3.9.1 When run through spec_server, running spec fails if the spec file is not specified with an absolute path: Probutanol:koulutusweb jarkko$ script/spec --options spec/spec.opts

Re: [rspec-users] spec_server requiring absolute paths (and autotest breaking)

2008-02-19 Thread David Chelimsky
On Feb 19, 2008 12:08 PM, Jarkko Laine [EMAIL PROTECTED] wrote: On 19.2.2008, at 17.57, David Chelimsky wrote: Did this just start happening for you? If so, it could be the patch I applied in r3310. Would you mind checking out 3309 and seeing if you still have this problem? Ok, found out

Re: [rspec-users] render_to_string in a controller test?

2008-02-19 Thread David Chelimsky
On Feb 19, 2008 1:18 PM, James Deville [EMAIL PROTECTED] wrote: On Feb 19, 2008, at 3:42 AM, David Chelimsky wrote: On Feb 18, 2008 8:10 PM, EAW [EMAIL PROTECTED] wrote: Hi all, I know that in general, view and controller tests should be isolated, such that controller specs don't

Re: [rspec-users] Old Style Stories

2008-02-20 Thread David Chelimsky
On Feb 20, 2008 12:06 AM, Zach Dennis [EMAIL PROTECTED] wrote: I was working on a past project tonight to trunk which is using the old story format. IE: Given desc do / end When someting do /end etc.. Is this officially supported, or is this just something that hasn't been ripped out

Re: [rspec-users] does the rspec_scaffold generator know about :references ?

2008-02-20 Thread David Chelimsky
On Feb 20, 2008 12:35 AM, Peter Recore [EMAIL PROTECTED] wrote: I checked out the CURRENT release of rspec and rails_spec as outlined on the rubyforge page. I am having trouble with models that use the :references column type. I get tests with syntax errors after generating a new class from

Re: [rspec-users] Webrat integration with Rspec and Rake tasks

2008-02-20 Thread David Chelimsky
On Feb 20, 2008 2:02 AM, Jarkko Laine [EMAIL PROTECTED] wrote: On 19.2.2008, at 20.45, James Deville wrote: I set RAILS_ENV in my stories/helper.rb file. That might be a good solution. On Feb 19, 2008, at 10:32 AM, Ed Howland wrote: Hi, I am trying to get Webrat integrated

Re: [rspec-users] Shared scenarios?

2008-02-20 Thread David Chelimsky
this: http://rspec.lighthouseapp.com/projects/5645/how-to-file-a-ticket. Then post back here if you have any questions. Cheers, David Michael On Feb 20, 2008, at 10:50 AM, David Chelimsky wrote: On Feb 20, 2008 1:30 PM, Michael Latta [EMAIL PROTECTED] wrote: In the story framework I

Re: [rspec-users] Unwanted fixture data messing up my other tests

2008-02-21 Thread David Chelimsky
On Thu, Feb 21, 2008 at 6:17 AM, Max Williams [EMAIL PROTECTED] wrote: I have a fixture for one of my tables that i use in some model tests. The data in it is messing up some other tests for a different model, that doesn't ask for the fixture - isn't the fixture data supposed to be cleared

Re: [rspec-users] Old Style Stories

2008-02-21 Thread David Chelimsky
On Thu, Feb 21, 2008 at 9:07 PM, Zach Dennis [EMAIL PROTECTED] wrote: On Wed, Feb 20, 2008 at 11:21 PM, Kero [EMAIL PROTECTED] wrote: I was working on a past project tonight to trunk which is using the old story format. IE: Given desc do / end When someting do /end

Re: [rspec-users] Old Style Stories

2008-02-21 Thread David Chelimsky
On Thu, Feb 21, 2008 at 10:26 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2008 at 9:07 PM, Zach Dennis As you mentioned David, Plain text is great for some situations, but so is writing in Ruby. This begs the question now that we have plain text stories. Can we

Re: [rspec-users] Old Style Stories

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:46 AM, Zach Dennis [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2008 at 11:40 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2008 at 10:26 PM, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2008 at 9:07 PM, Zach Dennis As you

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:50 AM, Maurício Linhares [EMAIL PROTECTED] wrote: Hello guys, I have the following spec: describe 'With successful save' do it 'Should redirect to the new page' do do_post response.should be_redirect response.should

Re: [rspec-users] Testing misc methods in ApplicationController

2008-02-22 Thread David Chelimsky
On Fri, Feb 22, 2008 at 7:58 AM, Max Williams [EMAIL PROTECTED] wrote: doh...dammit, i thought i'd tried that. I'm losing it... thanks! You're welcome. Cheers, David On 22/02/2008, David Chelimsky [EMAIL PROTECTED] wrote: On Fri, Feb 22, 2008 at 7:26 AM, Max Williams [EMAIL

Re: [rspec-users] Problems with redirect_to

2008-02-22 Thread David Chelimsky
://alinhavado.wordpress.com/ (pt-br) | http://codeshooter.wordpress.com/ (en) João Pessoa, PB, +55 83 8867-7208 On Fri, Feb 22, 2008 at 11:25 AM, David Chelimsky [EMAIL PROTECTED] wrote: On Fri, Feb 22, 2008 at 8:10 AM, Maurício Linhares [EMAIL PROTECTED] wrote: Using the path method the spec

Re: [rspec-users] Autotest with TDD test-first problem

2008-02-23 Thread David Chelimsky
On Fri, Feb 22, 2008 at 11:18 AM, Paul Dowman [EMAIL PROTECTED] wrote: Hi, I'm mostly quite happy using autotest with rspec, but there's one thing that's been bothering me, and as my test suite grows larger it'd becoming more painful. Autotest re-runs the entire suite whenever a spec that

Re: [rspec-users] disabling transactional fixtures for one spec

2008-02-23 Thread David Chelimsky
On Fri, Feb 22, 2008 at 11:21 AM, Paul Dowman [EMAIL PROTECTED] wrote: Sometimes I need a spec that tests something which can't work inside a transaction. Is it possible to disable transactional fixtures for one spec? I tried: describe MyClass without transactional fixtures do

Re: [rspec-users] rake task for stories

2008-02-23 Thread David Chelimsky
On Feb 23, 2008, at 12:16 PM, Joe Van Dyk [EMAIL PROTECTED] wrote: Any reason why there isn't a rake task for stories yet? (I'm looking in trunk) There is one for rspec_on_rails but it is nothing special. It just calls stories/ all.rb which is up to you to maintain. I know of at least

Re: [rspec-users] Newbie question Context vs Describe

2008-02-24 Thread David Chelimsky
On Sun, Feb 24, 2008 at 5:29 AM, Joe Ocampo [EMAIL PROTECTED] wrote: Background just started programming in Ruby literally 12 hours ago and have a question regarding context and describe methods. Reading the RDoc it indicated that context is an alias for describe. So I decided to try to the

Re: [rspec-users] How to dump contents produced during spec evaluation?

2008-02-24 Thread David Chelimsky
On Sun, Feb 24, 2008 at 5:54 PM, Alex Satrapa [EMAIL PROTECTED] wrote: In a story, I have the following happening: post(/resources/, 'resource' = request_attrs) response.should render_template('resource/new') response.should have_tag('*', /must have one or more X defined/) In

Re: [rspec-users] How to dump contents produced during spec evaluation?

2008-02-24 Thread David Chelimsky
On Sun, Feb 24, 2008 at 6:29 PM, Alex Satrapa [EMAIL PROTECTED] wrote: On 25/02/2008, at 10:58 , David Chelimsky wrote: On Sun, Feb 24, 2008 at 5:54 PM, Alex Satrapa [EMAIL PROTECTED] wrote: In the ResourceController spec, I have the following happening: post( :create

Re: [rspec-users] How to dump contents produced during spec evaluation?

2008-02-24 Thread David Chelimsky
On Sun, Feb 24, 2008 at 6:35 PM, s.ross [EMAIL PROTECTED] wrote: On Feb 24, 2008, at 4:29 PM, Alex Satrapa wrote: Okay, this is weird. The result seems to indicate that the body of the response is the literal text, resource/new: My autotest results show (I've changed the name of the

Re: [rspec-users] [Q] how to restructure tests for an abstract class?

2008-02-25 Thread David Chelimsky
On Mon, Feb 25, 2008 at 6:23 AM, Chuck Remes [EMAIL PROTECTED] wrote: Thanks for asking this question. This is exactly what I was going to write, but you beat me to it! (Sorry for the top-post; just following the last responder.) cr On Feb 25, 2008, at 3:30 AM, Matthijs Langenberg wrote:

Re: [rspec-users] Problems running pre-commit

2008-02-25 Thread David Chelimsky
On Mon, Feb 25, 2008 at 9:01 AM, Rupert Voelcker [EMAIL PROTECTED] wrote: Have been having some probs getting the pre-commit to run so help would be appreciated (then I can add some specs to my patch) - thanks for the suggestion to post here Dave :) I'm on OS X and have checked out the

Re: [rspec-users] Problems running pre-commit

2008-02-25 Thread David Chelimsky
On Mon, Feb 25, 2008 at 9:14 AM, David Chelimsky [EMAIL PROTECTED] wrote: On Mon, Feb 25, 2008 at 9:01 AM, Rupert Voelcker [EMAIL PROTECTED] wrote: Have been having some probs getting the pre-commit to run so help would be appreciated (then I can add some specs to my patch) - thanks

Re: [rspec-users] Problems running pre-commit

2008-02-25 Thread David Chelimsky
On Mon, Feb 25, 2008 at 10:24 AM, Rupert Voelcker [EMAIL PROTECTED] wrote: On 25/02/2008, David Chelimsky [EMAIL PROTECTED] wrote: On Mon, Feb 25, 2008 at 9:01 AM, Rupert Voelcker [EMAIL PROTECTED] wrote: Have been having some probs getting the pre-commit to run so help would

Re: [rspec-users] bad specs better than none?

2008-02-25 Thread David Chelimsky
On Mon, Feb 25, 2008 at 8:18 PM, Giles Bowkett [EMAIL PROTECTED] wrote: Hi - I've got a bunch of people using specs at a company. Everybody is writing specs, but people are not really practicing BDD. As in, the specs are there, but it doesn't go, write spec, write code, repeat. I recently

Re: [rspec-users] Test data problem (in general and with acts_as_tree)

2008-02-26 Thread David Chelimsky
On Tue, Feb 26, 2008 at 5:41 AM, Edvard Majakari [EMAIL PROTECTED] wrote: My problems seem to be arising from the fact that when i run the test, the objects i created last time are still in the database. Shouldn't they be cleared out automatically? This in turn is preventing me from

Re: [rspec-users] Test data problem (in general and with acts_as_tree)

2008-02-26 Thread David Chelimsky
and incorrectly think that that's the data every example is using. It is much, much safer (and more sane) to use before(:each) even though it may slow things down a bit. HTH, David On 26/02/2008, David Chelimsky [EMAIL PROTECTED] wrote: On Tue, Feb 26, 2008 at 5:41 AM, Edvard Majakari [EMAIL

Re: [rspec-users] how to set up data before story runner steps?

2008-02-26 Thread David Chelimsky
On Tue, Feb 26, 2008 at 10:53 PM, Bei [EMAIL PROTECTED] wrote: Hi I'm using story runner of RSpec now. What I'm trying to do is initializing the @selenium before any steps of one story is executing, and stop @selenium after any story is finished. just as @BeforeClass and @AfterClass

[rspec-users] the git experiment

2008-02-26 Thread David Chelimsky
Hey all, A while back I mentioned that we were going to move to git or hg. We decided that we'd experiment with each for a month and see how it goes. We're going to start with git. Obviously if all goes well we'll have to reassess whether or not to also give hg a try. We have a repo set up at

Re: [rspec-users] the git experiment

2008-02-27 Thread David Chelimsky
On Wed, Feb 27, 2008 at 12:00 AM, David Chelimsky [EMAIL PROTECTED] wrote: Hey all, A while back I mentioned that we were going to move to git or hg. We decided that we'd experiment with each for a month and see how it goes. We're going to start with git. Obviously if all goes well

Re: [rspec-users] bad specs better than none?

2008-02-27 Thread David Chelimsky
On Thu, Feb 28, 2008 at 12:49 AM, Korny Sietsma [EMAIL PROTECTED] wrote: Totally agree with this - I'm happy to work with specs that just define a single bit of the system's behaviour (i.e. unit tests) and specs that define behaviour across several different parts of the system (i.e.

Re: [rspec-users] rspec controller action list

2008-02-28 Thread David Chelimsky
On Thu, Feb 28, 2008 at 3:54 AM, Namrata Tiwari [EMAIL PROTECTED] wrote: This action will list all the articles according to city. Please, can some one guide me through this spec. def list @articles = find_city.articles.paginate :all, :page = params[:page] This line has what we call a

Re: [rspec-users] bad specs better than none?

2008-02-28 Thread David Chelimsky
On Thu, Feb 28, 2008 at 7:22 AM, Glenn Ford [EMAIL PROTECTED] wrote: I have a similar perspective from my own personal experience. I am still quite the novice, but I'm as much of a novice in RSpec as I am in Ruby / RoR. Honestly, a lot of my specs in new sections end up having great

Re: [rspec-users] Autotest file

2008-02-28 Thread David Chelimsky
On Thu, Feb 28, 2008 at 2:59 PM, Bryan Ray [EMAIL PROTECTED] wrote: I'm using rSpec 1.1.3 and ZenTest 3.9.1 and every time I run a test I get All Tests Passed ... perhaps I should just leave it that way? :p Anyways, I've attempted to construct my own ~/.autotest file and it's extremely basic,

Re: [rspec-users] Quiet Backtrace in RSpec

2008-02-29 Thread David Chelimsky
On Fri, Feb 29, 2008 at 1:08 PM, Jed Hurt [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2008 at 6:21 AM, David Chelimsky [EMAIL PROTECTED] wrote: On Thu, Feb 21, 2008 at 12:52 AM, Jed Hurt [EMAIL PROTECTED] wrote: Ahh, I see. Is Spec::Runner::QuietBacktraceTweaker configurable for more

Re: [rspec-users] outside-in = integration tests on views?

2008-02-29 Thread David Chelimsky
On Fri, Feb 29, 2008 at 5:33 PM, David Beckwith [EMAIL PROTECTED] wrote: Hi, In the spirit of outside-in are given-when-then scenarios supposed to be integration tests of views? Do you mean through views? - i.e. view down to the db? If so, that is one part of the picture. Or should we be

Re: [rspec-users] rspec with continuations: very strange

2008-03-01 Thread David Chelimsky
On Sat, Mar 1, 2008 at 11:37 AM, Giles Bowkett [EMAIL PROTECTED] wrote: I appear to have written code which travels backwards through time: http://www.vimeo.com/742590 This disturbs me immensely. If anyone can explain it, that would be cool. I think it's an illusion brought about by how

Re: [rspec-users] rspec controller action list

2008-03-03 Thread David Chelimsky
On Mon, Mar 3, 2008 at 5:04 AM, Namrata Tiwari [EMAIL PROTECTED] wrote: Matthias Hennemeyer wrote: Am 03.03.2008 um 04:38 schrieb Namrata Tiwari: The method find_city is in application controller. I think the method 'find_city' is being called but its expecting some args. The

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