[rspec-users] controller_name in rspec-rails2?

2010-04-27 Thread Steve
I have some specs that use controller_name because of namespaced temporary controllers in my specs. In rspec-rails2 I'm told that controller_name is not a valid method. Is there a workaround for this? Thanks, Steve ___ rspec-users mailing list

[rspec-users] How do I include routing path helpers?

2010-11-12 Thread Steve
hat I need to do? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How do I include routing path helpers?

2010-11-12 Thread Steve
ith capybara. So now I'm off to figure that out. Thanks, Steve On Nov 12, 2:56 pm, Evgeniy Dolzhenko wrote: > Not sure on how to do that with Steak but you must be looking to > include Rails.application.routes.url_helpers > somewhere, with vanilla RSpec it would be > > describe

Re: [rspec-users] How do I include routing path helpers?

2010-11-12 Thread Steve
Thanks, that did it. I still have a nil error when trying to call host_with_port on the request object inside url_for, but I think that is related to my app having subdomains, and trying to use those with capybara. On Nov 12, 2:56 pm, Evgeniy Dolzhenko wrote: > Not sure on how to do that with Ste

Re: [rspec-users] How do I include routing path helpers?

2010-11-13 Thread Steve
fault_url_options = { :host => "test.host", :protocol => 'https' } > end > > in your config\environments\test.rb > > > > On Sat, Nov 13, 2010 at 4:01 AM, Steve wrote: > > Thanks, that did it. I still have a nil error when trying to call > > host

Re: [rspec-users] How do I include routing path helpers?

2010-11-13 Thread Steve
We are indeed. There is no request var available in Capybara. I think that is supposed to be taken care of by Capybara.default_host which I have set, but still no dice. I see exciting times ahead trying to get this working. On Nov 13, 2:31 pm, Evgeniy Dolzhenko wrote: > We're into some horrible t

Re: [rspec-users] How do I include routing path helpers?

2010-11-14 Thread Steve
The issue is actually before getting to anything Capybara related. It's coming from my call to member_path @member in my spec to determine the route path to use. Looking at it this way the error makes more sense. Not sure how much fudging I would need to do to simulate there being a request there f

[rspec-users] Vim tree plugin?

2008-10-26 Thread Steve
Does anyone know if there's a vim plugin out there that will show a tree of your describe/it blocks at a glance. Preferably with click ability to go right to that location? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org

Re: [rspec-users] NO NAME (Because of --dry-run) output

2007-10-13 Thread Steve
ying to logon - with an invalid username should fail - with an invalid password should fail But I'm just getting: Person trying to logon - NO NAME (Because of --dry-run) - NO NAME (Because of --dry-run) Further, I tried the script/spec -fs line mentioned, and get a rake failure complaining of t

[rspec-users] Stories location

2007-10-14 Thread Steve
Should the stories dir be located on the project root? I was expecting to find it located under spec/ but there isn't anything there, just the stories dir off of /. Also there don't appear to be any rake tasks for stories, nor generators. Should there be any? Tha

[rspec-users] Example for attr_accessible?

2007-10-15 Thread Steve
cessible fields have been set properly. Would it be possible to mock or some such to check for a call to attr_accessible? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] generate script_controller not creating test code

2007-10-15 Thread Steve
ure if there is something that I did incorrectly or not. > > Does anyone know why this is happening? > > Thanks Did you do "generate rspec_controller" or "generate script_controller" like the subject indicates? Steve

[rspec-users] Failure trying to test ApplicationController

2007-10-15 Thread Steve
;logon') end end def require_login return true if User.current.logged_in? redirect_to :controller => "account", :action => "logon" and return false end The line it's failing on is the redirect_to in require_login. What am I doing wrong? Than

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

2007-10-15 Thread Steve
On Mon, 15 Oct 2007 23:46:32 -0500, David Chelimsky wrote: > 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 ni

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

2007-10-15 Thread Steve
On Tue, 16 Oct 2007 00:26:13 -0500, David Chelimsky wrote: > > You get responses (i.e. the response object in the spec) from actions > using get, post, put, delete, not by calling methods directly on the > controller. > > Part of the problem is that you're trying to spec something that > already

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

2007-10-15 Thread Steve
On Tue, 16 Oct 2007 01:02:58 -0500, David Chelimsky wrote: > But how do you know that it's being used? The behaviour you're > spec'ing is that a given action should redirect if the user is not > logged in, right? If you look at it that way, then it seems perfectly > acceptable to do this: > > des

[rspec-users] Named routes in controller not working?

2007-10-15 Thread Steve
I have some "redirect_to"s using named routes in a controller that work fine in the browser, but choke my tests. The route in question is "new_session" and comes from a "map.resource :session, :controller => :session" route mapping. If I replace the named route in the controller with controller/act

Re: [rspec-users] Named routes in controller not working?

2007-10-15 Thread Steve
On Tue, 16 Oct 2007 06:45:53 +, Steve wrote: > I have some "redirect_to"s using named routes in a controller that work > fine in the browser, but choke my tests. The route in question is > "new_session" and comes from a "map.resource :session, :controller

Re: [rspec-users] Named routes in controller not working?

2007-10-16 Thread Steve
Nevermind, I newbed the named route. It's obviously too late, and I should be in bed. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Example for attr_accessible?

2007-10-16 Thread Steve
On Tue, 16 Oct 2007 10:39:32 +0200, Wincent Colaiuta wrote: > Yes, I spec this kind of thing. > >describe User, 'accessible attributes' do > it 'should allow mass-assignment to the login name' do >lambda { new_user.update_attributes(:login_name => > String.random) }.should_not

Re: [rspec-users] Example for attr_accessible?

2007-10-16 Thread Steve
> > You could expect a call to attr_accessible and then load your model file. > > Or, loop through all the column names in your model, and make sure > that only the ones that are supposed to be accessible get set. > > Pat Expecting the call is what I had originally thought of, but couldn't figu

Re: [rspec-users] Example for attr_accessible?

2007-10-16 Thread Steve
On Tue, 16 Oct 2007 13:43:43 -0500, David Chelimsky wrote: > 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/model

[rspec-users] Spec dirs not in path?

2007-10-16 Thread Steve
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. Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge

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

2007-10-16 Thread Steve
On Tue, 16 Oct 2007 14:17:48 -0500, David Chelimsky wrote: > Do you mean the dirs inside rspec, or in the spec directory in your project? Inside the spec dir in the project. spec/controllers, spec/models, etc... ___ rspec-users mailing list rspec-users@

Re: [rspec-users] Example for attr_accessible?

2007-10-16 Thread Steve
ious validation functions? It would seem that unless you have some very custom validation methods, that you would be testing rails implementation of its validators, by running through all of the various checks manually. I guess maybe it depends on if you view the testing as mo

[rspec-users] should_receive

2007-10-16 Thread Steve
Is there any way to setup a should_receive so that it returns whatever it was passed in from the actual code? I just want to make sure that a specific function is called, I don't want to mess around with the parameters it receives, or what it does inside, or what it returns. Is that possible? Using

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

2007-10-17 Thread Steve
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 something like this class User < ActiveRecord::Base attr_accessor :password

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

2007-10-17 Thread Steve
On Wed, 17 Oct 2007 15:05:01 -0500, David Chelimsky wrote: > Versions? RSpec? Rails? > Details details. :) rspec/rspec_on_rails(trunk): r2717 rails(trunk): r7822 ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/list

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

2007-10-17 Thread Steve
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 happens. __

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

2007-10-17 Thread Steve
On Wed, 17 Oct 2007 21:12:27 +, Steve 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 upd

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

2007-10-17 Thread Steve
On Wed, 17 Oct 2007 16:17:53 -0500, David Chelimsky wrote: > Thanks for trying. Sorry it's still a problem. > > How are you running the specs (rake? spec command? textmate?) and what > precisely is the error that you get? Please include a stack trace (not > just one line) > > Thanks, > David I'm

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

2007-10-17 Thread Steve
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 changes things. It doesn't give that dupl

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

2007-10-17 Thread Steve
On Wed, 17 Oct 2007 18:01:11 -0500, David Chelimsky wrote: > One more thing to try. Open up spec/spec.opts and remove the line that > says "--reverse" if it's there. Then run "rake spec" again and see > what happens. > > Thanks, > David Removing --reverse makes "rake spec" fail like the other tw

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

2007-10-17 Thread Steve
On Wed, 17 Oct 2007 19:30:57 -0500, David Chelimsky wrote: >> Removing --reverse makes "rake spec" fail like the other two methods >> now. > > That's what I suspected would happen. > > The reason they were failing differently was that rake was running them > in the opposite order. Removing --rev

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

2007-10-17 Thread Steve
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 guessing and that's not > working out to well s

Re: [rspec-users] spec:models depends on development db:migration

2007-10-18 Thread Steve
On Thu, 18 Oct 2007 15:51:37 +0100, Keith McDonnell wrote: > For those interested > > rake spec:models seems to clone the test database from development. If > your dev db is empty, the models task fails mysteriously. > > Anyway, to make sure your dev db is at the current migration version,

Re: [rspec-users] spec:models depends on development db:migration

2007-10-18 Thread Steve
On Thu, 18 Oct 2007 11:30:03 -0500, David Chelimsky wrote: >> Yeah, I was just about to post about this. This seems like incorrect >> behavior. Especially if you're really doing behavior driven design. You're >> going to be writing your tests and using the test environment first before >> you actu

[rspec-users] View spec response has no content?

2007-10-21 Thread Steve
I have been messing with this all night, and can't figure out what's going wrong here. I have a test that renders the view, and then a shared behavior checks "response" for the various tags from a rails layout. The problem is matching. If I run in the browser the page renders fine. Is there a way t

Re: [rspec-users] View spec response has no content?

2007-10-21 Thread Steve
On Mon, 22 Oct 2007 02:49:59 +, Steve wrote: > I have been messing with this all night, and can't figure out what's going > wrong here. I have a test that renders the view, and then a shared > behavior checks "response" for the various tags from a rails layout. Th

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

2007-10-21 Thread Steve
er any resolution on this? This would be a *very* beneficial capability to have for making sure views work as expected. Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Pending should_receive shows as FIXED

2007-10-21 Thread Steve
rmine expectations rather than its enclosing "pending" block. Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

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

2007-10-22 Thread Steve
> and it will render with the layout. So you *could* (in theory, I > haven't done this yet) do something like this: It would feel even less hackish if "render" supported :text like rails render does. So you could do this: render :text => 'yielded

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

2007-10-22 Thread Steve
end > end > > def use_layout(expected) >UseLayout.new(expected) > end This looked promising, but when I try calling controller.layout, I get "undefined method 'layout'" on otherwise working controller specs. I didn't think ActionController exposed a lay

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

2007-10-22 Thread Steve
> end > > def use_layout(expected) >UseLayout.new(expected) > end I didn't think ActionController exposed a "layout" property. When I went to try calling controller.layout on some existing specs I got an undefined method 'layout' exception. Did you modify

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

2007-10-22 Thread Steve
end > end > > def use_layout(expected) >UseLayout.new(expected) > end This looked promising, but when I try calling controller.layout, I get "undefined method 'layout'" on otherwise working controller specs. I didn't think ActionController exposed a lay

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

2007-10-22 Thread Steve
On Tue, 23 Oct 2007 00:55:40 +, Steve wrote: > This looked promising, but when I try calling controller.layout, I get > "undefined method 'layout'" on otherwise working controller specs. I > didn't think ActionController exposed a layout property. If thi

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

2007-10-22 Thread Steve
On Mon, 22 Oct 2007 20:06:50 -0500, David Chelimsky wrote: >> It would feel even less hackish if "render" supported :text like >> rails render does. So you could do this: >> >> render :text => 'yielded', :layout => 'application' >> response.should have_tag('div', 'yielded') > > Good idea. Feature

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

2007-10-23 Thread Steve
On Tue, 23 Oct 2007 03:16:32 +, Steve wrote: > On Mon, 22 Oct 2007 20:06:50 -0500, David Chelimsky wrote: > >>> It would feel even less hackish if "render" supported :text like >>> rails render does. So you could do this: >>> >>>

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

2007-10-23 Thread Steve
On Tue, 23 Oct 2007 17:58:45 -0500, David Chelimsky wrote: >> I don't know if there are any repercussions, but just adding :text to the >> array in >> rspec_on_rails/lib/spec/rails/dsl/behaviour/view_example.rb:subject_of_render >> was enough to make it work. > > That's cool, but that's not how w

[rspec-users] Setting session values

2007-10-24 Thread Steve
ssion) I tried creating a new session, but nothing seems to do it. I'm sure there's something I'm missing. Suggestions? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Specs with -X fail

2007-10-24 Thread Steve
I have some specs that run just fine using "rake spec:controllers" or "script/spec spec/controllers" but if I run "script/spec spec/controllers -X" with the spec server running, I end up getting some mocks that fail saying expected once, and being called twice. Any ideas what would cause this kind

Re: [rspec-users] Specs with -X fail

2007-10-24 Thread Steve
On Wed, 24 Oct 2007 21:36:15 -0400, Scott Taylor wrote: > > Did you try restarting the drb server? > > Scott Yes. Multiple times. Exact same results each time. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinf

Re: [rspec-users] Setting session values

2007-10-24 Thread Steve
On Wed, 24 Oct 2007 21:29:39 -0400, Jonathan Linowes wrote: > i've done this in controller specs > > session[:whatever] = something > do_it > Yeah, I did that, and it was turning up nil when I actually made the request. ___ rspec-users mailing list r

[rspec-users] "WARNING" after each spec

2007-10-24 Thread Steve
ny idea what causes this to be thrown out there? Is this an RSpec thing? Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] "WARNING" after each spec

2007-10-25 Thread Steve
On Thu, 25 Oct 2007 05:30:38 +, Steve wrote: > I just updated to r2784, and now all of my specs output the '.' and then > 'WARNING: there is already a transaction in progress', either once or > twice before the next dot. It's indicating that all specs are p

Re: [rspec-users] "WARNING" after each spec

2007-10-25 Thread Steve
On Thu, 25 Oct 2007 17:38:07 -0500, David Chelimsky wrote: > Actually, if you get the latest trunk this should be fixed. Let me know. > > Thanks, > David Yep, looks good now. Thanks. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyfor

[rspec-users] spec_server doesn't update 'required' files

2007-10-25 Thread Steve
d files as well when a spec is run? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] spec_server doesn't update 'required' files

2007-10-25 Thread Steve
On Thu, 25 Oct 2007 20:09:23 -0500, David Chelimsky wrote: > On 10/25/07, Steve <[EMAIL PROTECTED]> wrote: >> I have some specs that 'require' other files. When running spec_server, if >> these required files are changed, it's not picked up when the specs are &

[rspec-users] Spec custom finders

2007-10-26 Thread Steve
I have some finders in my models where I write some of the sql myself. I of course want to test these, but am not sure the best way. Should I just let them roll through to the db, and verify they return the correct objects based on the fixtures I load, or should I spec the actual query? I know that

[rspec-users] rspec_autotest failing

2007-10-26 Thread Steve
/1.8/gems/rspec-1.0.8/bin/spec:3 from /usr/bin/spec:16:in `load' from /usr/bin/spec:16 I'm currently running rspec at r2794 If there's another method that is preferred for automatic testing, please let me know. Thanks, Steve __

Re: [rspec-users] rspec_autotest failing

2007-10-26 Thread Steve
On Fri, 26 Oct 2007 13:38:09 -0400, Scott Taylor wrote: > That's quite outdated. RSpec now comes with it's own autotest plugin > (which should use it by default, if you have the rspec gem installed). > > Scott I'm running from trunk, and don't have the gem installed. How is autotesting enable

Re: [rspec-users] rspec_autotest failing

2007-10-26 Thread Steve
On Fri, 26 Oct 2007 18:51:17 +, Steve wrote: > On Fri, 26 Oct 2007 13:38:09 -0400, Scott Taylor wrote: > >> That's quite outdated. RSpec now comes with it's own autotest plugin >> (which should use it by default, if you have the rspec gem installed). >&g

Re: [rspec-users] rspec_autotest failing

2007-10-26 Thread Steve
On Fri, 26 Oct 2007 15:01:30 -0400, Josh Knowles wrote: > On 10/26/07, Steve <[EMAIL PROTECTED]> wrote: >> >> I'm running from trunk, and don't have the gem installed. How is >> autotesting enabled? Is it a special switch passed to 'spec' or

Re: [rspec-users] rake spec default environment

2007-10-29 Thread Steve
On Mon, 29 Oct 2007 10:55:32 -0400, Scott Taylor wrote: > Well, usually the schema of the development database is copied to the > test one (you wouldn't want to run 100 migrations just because you > fired up your test now, would you?) > > Scott This has been discussed recently. If you're doi

Re: [rspec-users] Facets and/or Nested Describes

2007-10-31 Thread Steve
Personally I prefer the semantics of "facet", but really would be fine with nested describes. I have so much redundancy in my controllers. It would be great to get rid of a lot of that. I think having before/after callbacks would be mandatory. Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Test that controller includes helpers?

2007-11-02 Thread Steve
Is there an easy way to spec that a controller should include helpers other than its own? I was thinking I could just spec responds_to for methods I'm interested in in the view, but that seems like crossing a separation boundary, that the controller maybe doesn't need to know about? Tha

Re: [rspec-users] Test that controller includes helpers?

2007-11-03 Thread Steve
at the controller instance that was called though? If I could do that, I could simply check for a responds_to at the very least, right? I understand what you mean by blurring the lines though. Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] be_success misleading

2007-11-10 Thread Steve
as not. Perhaps something like 'response.should have_success_status'? Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Should receive field_for failing

2007-11-14 Thread Steve
ddress'. Is there a way to check for this through the primary view, or should I just spec the partial individually? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Failed specs spike autotest

2008-02-14 Thread Steve
if there's any more information I can provide. Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Failed specs spike autotest

2008-02-14 Thread Steve
nching into all of that. I think it then thinks that perhaps the broken specs are fixed, so that's why it then tries to run all of the specs again. Finished in 15.703733 seconds 398 examples, 1 failure, 1 pending /usr/bin/ruby1.8 -S script/spec -O spec/spec.opts /usr/bin/ruby1.8 -S script/s

[rspec-users] Wrong ZenTest being used?

2008-02-14 Thread Steve
ing from a previously working much earlier rev of rspec/rails, and zentest. I'm guessing something old is lingering around. Where would I be best off looking? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/m

Re: [rspec-users] Wrong ZenTest being used?

2008-02-14 Thread Steve
On Thu, 14 Feb 2008 17:53:42 +, Steve wrote: > When I try to run autotest I get the following error: > > loading autotest/rails_rspec > /usr/local/lib/site_ruby/1.8/rubygems.rb:319:in `activate': can't > activate ZenTest (= 3.7.1), already activated ZenTest

[rspec-users] Run all tests after success

2008-02-15 Thread Steve
, or is something wrong? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Failed specs spike autotest

2008-02-15 Thread Steve
On Fri, 15 Feb 2008 01:07:27 -0500, David Chelimsky wrote: > 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. > Thanks, I appreciate i

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

2008-02-16 Thread Steve
On Sat, 16 Feb 2008 10:23:53 -0500, David Chelimsky wrote: > On Feb 15, 2008 6:06 PM, Steve > <[EMAIL PROTECTED]> wrote: >> I seem to remember when I was running a previous version of rspec and >> autotest that when a set of specs passed for some changed files, that >&g

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

2008-02-16 Thread Steve
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 No > server is running > > I've

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

2008-02-16 Thread Steve
necessary loading in that file. There's really no way to know what crazy way someone might layout their projects. Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Helpers in view specs

2008-02-16 Thread Steve
n the view spec, so that that output could be expected. My helper functions all have their own specs, so it would seem that I'm not doing anything magical, just making the specs a little simpler. Steve ___ rspec-users mailing list rspec-users@rub

Re: [rspec-users] Helpers in view specs

2008-02-17 Thread Steve
On Sun, 17 Feb 2008 08:06:10 -0500, David Chelimsky wrote: > On Feb 17, 2008 1:08 AM, Steve > <[EMAIL PROTECTED]> wrote: >> I'm not sure of what the community stance is on this, but is there a >> builtin way to include helpers in view specs? Is this practice shunned?

Re: [rspec-users] Helpers in view specs

2008-02-17 Thread Steve
On Sun, 17 Feb 2008 12:40:31 -0500, David Chelimsky wrote: > On Feb 17, 2008 11:17 AM, Steve > <[EMAIL PROTECTED]> wrote: >> >> In the example I actually have "include ApplicationHelper" in there, >> and am using a method "row_class_for_idx" in t

[rspec-users] File loading bug

2008-02-18 Thread Steve
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] File loading bug

2008-02-18 Thread Steve
On Mon, 18 Feb 2008 17:06:03 -0500, David Chelimsky wrote: > 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 restar

[rspec-users] rspec_controller generator for HAML?

2008-02-18 Thread Steve
Is there currently an option to have the rspec_controller generator generate haml instead of erb view files, and the corresponding spec? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec

[rspec-users] Session empty after request

2008-03-08 Thread Steve
.should_receive(:set_current_user) do_request end When I watch the spec with my debugger, when it gets to the code, the session is empty, and the spec fails. What would be causing this? Am I setting the session wrong? I have also tried just session, and request.session with the same results.

Re: [rspec-users] ridding away with do_request

2008-03-08 Thread Steve
On Sat, 08 Mar 2008 15:51:01 -0500, Zach Dennis wrote: > I'm heading out of town, but had a quick thought I wanted to share. > Rather then using ambiguous named request helpers in controller specs > like "do_request", I've been using more readable helpers like > "post_create". snip > IMO is add

[rspec-users] Fixture Scenarios plugin

2008-04-29 Thread Steve
Just curious if anything special needs to be done to use the Rails fixture scenarios plugin(http://code.google.com/p/fixture-scenarios/) with rspec? Would I just create the "scenarios" inside the spec/fixtures dir, as opposed to the test/fixtures dir? Tha

[rspec-users] Clear a stub

2008-07-27 Thread Steve
just overwrite the previous stub value, but instead it seems to turn the stub into an array making the previous value the first element, and then the new value the second. Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://r

Re: [rspec-users] Clear a stub

2008-07-27 Thread Steve
Pat Maddox wrote: Can you paste your code please? Here's an example I just whipped up that seems to work fine...I'm using a stub defined inline, a stub defined in two steps, and a partially stubbed object. They all shadow the outer stub. What does your code look like? Pat It looks like I w

Re: [rspec-users] Clear a stub

2008-07-27 Thread Steve
Pat Maddox wrote: ...big snip... Well, a lot of stuff has happened since then :) However, I'm not sure what your problem is still so I can't tell you that it's been fixed since then. It sounds to me like you're saying reservations(:single) returns a Reservation object in one test, but [] in th

Re: [rspec-users] Clear a stub

2008-07-28 Thread Steve
Pat Maddox wrote: etc. It's super weird that it works in every other place but not here. So I'd start from the tiniest thing possible and add lines until you find one that breaks it. Pat So I went through and took the whole thing apart. It turns out that it is/was a stub issue(just not qui

Re: [rspec-users] Clear a stub

2008-07-31 Thread Steve
Scott Taylor wrote: Of course there is a way - the question is, do you really want to use it? After seeing that, no, not really. I agree with you on it likely messing with clarity. I opted to rework my specs. It wasn't my preferred option, but there really wasn't a better way. Thanks to both

[rspec-users] Rails views have_tag with html inside

2008-08-01 Thread Steve
d ''. I know that have_tag is based on HTMLSelector, so it's not specifically RSpec, but does anyone know how to work around this? Thanks, Steve ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Rspec doesn't pickup the status code correctly.

2008-08-03 Thread Steve
url = ['http:','', request.host].join('/') respond_to do |format| format.json { render :json => {:errors => errors, :url => url }, :status => 409} end end end I don't know if it's the cause, but yo

[rspec-users] hash_excluding/hash_only?

2008-08-06 Thread Steve
I know there is a hash_including, which is quite useful. Are there by chance any matchers for ensuring a hash includes only the specified values, or that it doesn't have certain values? Thanks, Steve ___ rspec-users mailing list rspec-

Re: [rspec-users] hash_excluding/hash_only?

2008-08-06 Thread Steve
Mark Wilden wrote: On Wed, Aug 6, 2008 at 9:22 AM, Steve <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: I know there is a hash_including, which is quite useful. Are there by chance any matchers for ensuring a hash includes only the specified values, or that it

[rspec-users] ThreadError on click_button

2009-10-30 Thread Steve Scruggs
I get the following error ThreadError in 'Managing InvoicePayments viewing index lists all InvoicePayments' stopping only thread note: use sleep to stop forever (eval):2:in `click_button' when running rake spec using rspec and rspec-rails 1.2.9 and webrat 0.5.3. I have tried webrat 0.6.rc1 wit

Re: [rspec-users] ThreadError on click_button

2009-11-03 Thread Steve Scruggs
Steve Scruggs wrote: > I get the following error > > ThreadError in 'Managing InvoicePayments viewing index lists all > InvoicePayments' > stopping only thread > note: use sleep to stop forever > (eval):2:in `click_button' > > when running rake spec us

Re: [rspec-users] What is difference between TDD & BDD

2010-01-31 Thread steve ross
On Jan 31, 2010, at 9:13 AM, Ravi Shankar wrote: > > What is the difference between test driven development & behavior driven > development, which one is better. > > what are the options available in BDD. Make up a simple project like a blog that you can do in couple of hours. Try it using one

Re: [rspec-users] testing controllers using cucumber

2010-02-01 Thread steve ross
On Feb 1, 2010, at 1:30 AM, Amit Kulkarni wrote: > > Oh ok. >> From your code it seems that we are checking the whole app as you > mentioned. > I have tested controllers using rspec. > So i am not getting which is better to use. > Since with Rspec we test the objects and here using cucumber(good

  1   2   >