Re: [rspec-users] undefined method `run_all' for []:Array

2013-02-07 Thread Doug Livesey
David Chelimsky wrote in post #971870: > On Sun, Jan 2, 2011 at 5:42 AM, Kristian Mandrup > wrote: >> I'm using the latest ruby 1.9.3-head and recently whenever I run rspec >> (2.2+) I get the following error: >> >> I have seen others have run into this issue, but to resolve it just >> rolled back

Re: [rspec-users] Stubbing corner case

2011-05-02 Thread Doug McInnes
On Apr 25, 2011, at 10:51 AM, Doug McInnes wrote: > Sure! > Here's the Gist: > > https://gist.github.com/940868 > > It's works in Rspec 2.5.1, but not in Rspec 1.3.2 > > Doug > > > On Apr 23, 2011, at 3:00 PM, David Chelimsky wrote: > >

Re: [rspec-users] Stubbing corner case

2011-04-25 Thread Doug McInnes
Sure! Here's the Gist: https://gist.github.com/940868 It's works in Rspec 2.5.1, but not in Rspec 1.3.2 Doug On Apr 23, 2011, at 3:00 PM, David Chelimsky wrote: > On Apr 22, 2011, at 4:58 PM, Doug McInnes wrote: > >> Hi! >> >> I was just talking to @dch

[rspec-users] Stubbing corner case

2011-04-23 Thread Doug McInnes
ting around. The easiest way to fix this is to use stub! in both places. Regardless we were surprised that the proxy sticks around after a test run. What is the reason for keeping it around? Thanks for your time! Doug McInnes ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Controller Specs - undefined local variable or method 'app'

2011-02-12 Thread Doug Bryant
Thanks for taking the time to look at it. Doug On Sat, Feb 12, 2011 at 2:39 PM, James Martin wrote: > Not 100% sure, but that failure looks suspiciously like something you > get when using rack-test; which expects an 'app' method to be defined > that returns an insta

[rspec-users] Controller Specs - undefined local variable or method 'app'

2011-02-11 Thread Doug Bryant
n `block (4 > levels) in ' Has anyone else run across this? Any ideas about how to fix it? Doug ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Fixtures not loading when running full test suite

2011-01-27 Thread Doug Bryant
to trigger the issue too. My spec_helper.rb is: https://gist.github.com/0d3ea01ffe4a15f4b2b3 Does anything stand out? Has anybody else experienced this? Any ideas? Thanks, Doug On Fri, Aug 14, 2009 at 6:04 AM, Rob Aldred wrote: > Hi, I've been trying to work this out for

Re: [rspec-users] specs pass individually, but fail using autotest

2010-11-22 Thread Doug E.
On Nov 22, 12:02 am, David Chelimsky wrote: > On Nov 20, 2010, at 9:49 PM, Doug E. wrote: > > > Problem discovered, but not solved. It isn't an rspec problem. It's > > caused by nifty-authentication's use of Mocha's any_instance. > >

Re: [rspec-users] specs pass individually, but fail using autotest

2010-11-20 Thread Doug E.
ect of any_instance.stubs(:sym). On Nov 20, 9:49 pm, "Doug E." wrote: > On Nov 20, 8:43 pm, "Doug E." wrote: > > > > > > > > > > > Hi, > > I'm trying to run autotest and I'm using ryanb's nifty authentication > &

Re: [rspec-users] specs pass individually, but fail using autotest

2010-11-20 Thread Doug E.
On Nov 20, 8:43 pm, "Doug E." wrote: > Hi, > I'm trying to run autotest and I'm using ryanb's nifty authentication > with Rails 3 and Rpec 2. When I run autotest, the user model spec > fails all its validation tests with the "error_on" matcher. >

[rspec-users] specs pass individually, but fail using autotest

2010-11-20 Thread Doug E.
have(1).error_on(:password)" fail. Below is the output from autotest, including the initial run, and second run after I make a trivial change to the spec. Thanks. Doug >>>>>>>>>> Failures: 1) User should require username Failure/Error: new_user(:username

Re: [rspec-users] [Rails] rails view helpers, BDD, and what to mock

2010-09-18 Thread Doug E.
On Sep 17, 9:16 pm, Myron Marston wrote: > On Sep 17, 12:48 pm, "Doug E." wrote: > > > > > > > Hi, > > > I'm trying to understand BDD and proper testing technique. I'm testing > > a rails view helper method that checks user roles to s

[rspec-users] [Rails] rails view helpers, BDD, and what to mock

2010-09-17 Thread Doug E.
7;m trying to wrap my head around what rspec tests go where and how to structure them, and leave integration testing to cucumber. Thanks. Doug PS My apologies to the moderators if you've been getting spammed with different versions of this post as I've stumbled about trying to g

Re: [rspec-users] How are people speccing and cuke-ing Paperclip (with S3)?

2010-07-17 Thread doug livesey
& try something more like this -- thanks! Doug. On 17 July 2010 17:58, Steve Klabnik wrote: > One of the things that you learn after testing for a while is "what to > test." You don't need to test Paperclip's ability to put files to S3; that's > what Pap

Re: [rspec-users] How are people speccing Rails 3 ActiveRecord queries?

2010-07-17 Thread doug livesey
w I get on with approach no. 2 for a while. Thanks, Doug. On 17 July 2010 17:11, David Chelimsky wrote: > On Jul 17, 2010, at 10:37 AM, doug livesey wrote: > > > Hi -- how are people speccing Rails 3 ActiveRecord queries? > > At the minute I'm chaining a load of should

[rspec-users] How are people speccing and cuke-ing Paperclip (with S3)?

2010-07-17 Thread doug livesey
think of all sorts of horrible solutions, like making the storage strategy dependent on the environment, like using the file system if it is a test or cucumber env. But I'd hate to resort to that. Any & all advice really appreciated! Cheers, Doug.

[rspec-users] How are people speccing Rails 3 ActiveRecord queries?

2010-07-17 Thread doug livesey
Hi -- how are people speccing Rails 3 ActiveRecord queries? At the minute I'm chaining a load of should_receive calls on mock relation objects, but can't help thinking that there must be a more elegant way of going about it. Is there a best practice for this, yet? Cheer

Re: [rspec-users] Accessing view helpers to spec cell views, Rails3, RSpec2

2010-07-08 Thread doug livesey
Perfect, thankyou! :) On 8 July 2010 11:58, David Chelimsky wrote: > On Jul 8, 2010, at 4:29 AM, doug livesey wrote: > > Hi -- I'm trying to use the excellent Cells <http://cells.rubyforge.org/> gem > in a Rails 3 project with RSpec 2. > I've got the 'contr

[rspec-users] Accessing view helpers to spec cell views, Rails3, RSpec2

2010-07-08 Thread doug livesey
27;m still drawing a blank, there. Could someone advise me on how to access the view helpers in a spec that falls outside of the normal rails dir structure? (The actual path to the spec in question is "spec/cells/tabs/show.html.haml_spec.rb", and the f

[rspec-users] rspec controller test strange error: undefined method `call' for nil:NilClass

2010-07-02 Thread Doug
must be doing something dumb not sure, but the 'call' appears to be on the block.call when the respond_to block gets executed. straight forward "channels" resource with a 'create' action only new thing is just assigning the current_user to the model. def create @channel = Channel.n

[rspec-users] rake spec seems to not clean the database after failing specs

2009-12-28 Thread Doug
running all specs with 'rake spec' working on a spec that gets run last. when run individually, it is green. but in 'rake spec' it fails because the database is dirty I'm guessing this is caused by early specs that fail as well is this normal? if that's the problem, what's the best way to f

Re: [rspec-users] be_true and be_false are suddenly undefined

2009-12-25 Thread Doug
hanks again, -doug. On Dec 25, 5:51 pm, aslak hellesoy wrote: > > I tried to reproducevery strange > > I'm back to being confused again. > > ..as to why of course > > > in my blank, demo project I ran > > > script/generate --webrat --rspec --testun

Re: [rspec-users] be_true and be_false are suddenly undefined

2009-12-25 Thread Doug
x27; require 'webrat/core/matchers' require 'cucumber/webrat/element_locator' # Deprecated in favor of #tableish - remove this line if you don't use #element_at or #table_at Webrat.configure do |config| config.mode = :rails config.open_error_files = false # Set to true if

Re: [rspec-users] be_true and be_false are suddenly undefined

2009-12-25 Thread Doug
y code.,etc. > > You should never load your spec_helper.rb from Cucumber. > > > > > > nothing works > > > btw: be_true and be_false work in my existing spec test; it's just in > > cucumber steps. > > > > > > On Dec 24, 1:14 am, M

Re: [rspec-users] be_true and be_false are suddenly undefined

2009-12-25 Thread Doug
uld do it, but it doesn't work. I've tried requiring spec_helper, etc. putting the requires closer to my code.,etc. nothing works btw: be_true and be_false work in my existing spec test; it's just in cucumber steps. On Dec 24, 1:14 am, Matt Wynne wrote: > On 24 Dec 2

[rspec-users] be_true and be_false are suddenly undefined

2009-12-23 Thread Doug
after upgrading cucumber to 5.1 be_true and be_false are undefined switching to == true or == false works. ??? thanks. Then there is an invalid item with 1 "upc" error # features/step_definitions/extract_steps.rb: 56 undefined method `be_true' for # (NoMethodError)

Re: [rspec-users] Resources on using RSpec with Sinatra

2009-10-14 Thread doug livesey
with it, I'll take note of what I did & remember the wiki. Cheers, Doug. 2009/10/14 David Chelimsky > On Wed, Oct 14, 2009 at 8:14 AM, doug livesey wrote: > > Could anybody post resources on using RSpec with Sinatra? > > There's no official resource that I'

[rspec-users] Resources on using RSpec with Sinatra

2009-10-14 Thread doug livesey
Could anybody post resources on using RSpec with Sinatra?Thanks, Doug. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Need Help

2009-09-21 Thread doug livesey
If you go to peepcode.com, they have some excellent resources on RSpec & Cucumber, and there is always The RSpec Book (from the pragmatic programmers).HTH, Doug. 2009/9/21 Mithun Perera > Hi all, > I am an university student and these days i am on training period. So i > want

Re: [rspec-users] Stubbing out Time correctly

2009-07-13 Thread doug livesey
Can you just stub it before the example in question, either in it or in a before block? 2009/7/13 Adam Anderson > I can't seem to find a good way to do this. If I stub out Time.now in one > of my specs but need to return it to its original functionality then can I > remove the stub? > > So I'd l

Re: [rspec-users] should_receive with a block

2009-07-07 Thread doug livesey
Hi -- cheers for that. I've taken your advice (the 1st approach). ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] should_receive with a block

2009-07-07 Thread doug livesey
hould_receive( :do_to_in_groups_of ).with( @properties_params, 50, &block ) do_call end Or am I dreaming? Cheers, Doug. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
>"7"}], [{:property_holly_id__c=>"8"}], [{:property_holly_id__c=>"10"}]) Which suggests that the final item in @params that gets passed in is not being read. A debug puts of the items as they are used in the method shows that all are, in fact, being used. Damn'ed if I know! ;) Thanks again for all your input -- I've now got blocks in stubs to play with! Doug. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
Nope, same error -- bizarrely, a stub call in the before block works just fine. Property.stub!( :new ).and_return( *...@properties ) Very confusing! ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-u

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
it is something to do with the way I have the expectation structured? For curiosity's sake, I'm going to try explicitly calling each element in the two arrays & see if that makes any difference -- I'll post back how I get on. Cheers, Doug. ___

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
That'll be: /home/doug/work/rails/neville/vendor/gems/rspec-1.2.7/lib/spec/mocks/message_expectation.rb:171:in `call' /home/doug/work/rails/neville/vendor/gems/rspec-1.2.7/lib/spec/mocks/message_expectation.rb:171:in `invoke_return_block' /home/doug/work/rails/neville/vendor/gems/

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
Copying that (a-la monkey see, monkey do), I get: /home/doug/work/rails/neville/vendor/gems/rspec-1.2.7/lib/spec/mocks/message_expectation.rb:171:in `call' /home/doug/work/rails/neville/vendor/gems/rspec-1.2.7/lib/spec/mocks/message_expectation.rb:171:in `invoke_return_block' /home

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
Cheers, I'll update, re-unpack gems, & report back. Doug. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
> Why don't you debug it and find out where the call is coming from? I get: /home/doug/work/rails/neville/vendor/gems/rspec-1.2.7/lib/spec/mocks/message_expectation.rb:171:in `call' That block's a very useful feature I was unaw

[rspec-users] mock object in array is getting size called on it

2009-06-26 Thread doug livesey
when I run the expectation: NoMethodError in 'Property.bulk_create_from_holly( params ) should generate a new property with each set of params' undefined method `size' for # /home/doug/work/rails/neville/app/models/property.rb:20:in `bulk_create_from_holly' /home/doug/work/rails/neville

Re: [rspec-users] removing Mocha; 'spec spec' fails but the specific model file passes

2009-06-17 Thread Doug
to do this? ... without using config.mock_with :mocha, of course thanks On Jun 13, 5:35 pm, David Chelimsky wrote: > On Sat, Jun 13, 2009 at 4:30 PM, Doug wrote: > > I happened to mix ryan bates' authentication scaffold with > > rspec_scaffold on a  demo project. > > and r

[rspec-users] removing Mocha; 'spec spec' fails but the specific model file passes

2009-06-13 Thread Doug
I happened to mix ryan bates' authentication scaffold with rspec_scaffold on a demo project. and ran into the problem of mixing mock frameworks...ryan uses mocha. So, as a learning experience, I choose to redo ryan's tests without mocha but ran into a strange problem with tests of the User model.

[rspec-users] response.should be_success -- what does this prove?

2009-06-05 Thread doug livesey
Hi -- if my controller action already ensures that the correct template is being rendered, what use is speccing that it should also be successful? I do it, but just because I saw someone else do it ages ago. Is there a point? Cheers, Doug. ___ rspec

[rspec-users] failing feature step when have_selector uses block

2009-05-20 Thread doug livesey
estigate what was failing). This is the second weird thing I have seen with nested blocks in have_selector (the first was nested calls to have_selector only checking immediate descendants of the block parameter). Is there something about their use that I&#

[rspec-users] Where to spec authentication and roles-based permissions?

2009-05-08 Thread doug livesey
cient Permissions" Given super user is logged in When I go to the controller-a index Then I should see "Welcome, my lord" Any advice is very appreciated -- as you can probably tell, this is getting messy! Cheers, Doug. ___ r

Re: [rspec-users] have_selector only matching immediate descendants in block

2009-05-06 Thread doug livesey
Will do -- cheers! 2009/5/6 David Chelimsky > On Wed, May 6, 2009 at 7:14 AM, doug livesey wrote: > > Hi -- I have an expectation that looks like this: > > > > it "should display a field for the username" do > > do_render > > respo

[rspec-users] have_selector only matching immediate descendants in block

2009-05-06 Thread doug livesey
orm (so just saying "response.should have_selector( "input" ... )"), it passes fine. So is have_selector supposed to only match immediate descendants of the selector in the block definition, or is this a bug ... ... Or am I being seriously dumb, here? ;) Cheers, Doug. __

Re: [rspec-users] DRB errors running rake pre_commit

2009-05-03 Thread Doug
Thanks David, that did it for me. On May 2, 8:00 pm, David Chelimsky wrote: > On Sat, May 2, 2009 at 2:11 AM, Doug wrote: > > Hi list, > > > I checked out the rspec-dev repository on a MBP (Leopard) and tried to > > run the pre_commit task after going through the setup

[rspec-users] DRB errors running rake pre_commit

2009-05-02 Thread Doug
Hi list, I checked out the rspec-dev repository on a MBP (Leopard) and tried to run the pre_commit task after going through the setup/configuration steps on http://wiki.github.com/dchelimsky/rspec/contribute. I'm getting DRB errors related to script/spec_server when running specs: Address already

Re: [rspec-users] mocked models' names being overwritten by rspec

2009-04-30 Thread doug livesey
Please ignore me, I'm a drooling moron. :) 2009/4/30 doug livesey > Hi -- I have a model that has a name attribute, and a method I'm speccing > to remove all models from a collection if they have a name that starts with > an underscore. > My problem is that RSpec seems

[rspec-users] mocked models' names being overwritten by rspec

2009-04-30 Thread doug livesey
should be passing. When I run it, none of the underscore-prefixed models are removed, and RSpec's complaint lists all the models that were in the original list, but with names like "Model_1007", "Model_1008" -- basically, the kinds of names that mock_model might give.

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-29 Thread doug livesey
probably just > skip the above, and fake a response from the remote system ... acutally > leaving the ActiveResource model in the system, and therefore, tested > Just havn't had that chance yet > > > > > On Tue, Apr 28, 2009 at 7:55 AM, doug livesey wrote: > >&

Re: [rspec-users] Before and After blocks for individual feature files?

2009-04-28 Thread doug livesey
Brilliant, cheers! Doug. 2009/4/28 Julian Leviston > Perhaps use background? > > Julian. > > > > On 28/04/2009, at 10:18 PM, doug livesey wrote: > > Hi -- is it possible to set before and after blocks for individual feature >> files? >> I've tri

[rspec-users] Before and After blocks for individual feature files?

2009-04-28 Thread doug livesey
t try it anyway. Anyway, I have some features that require a specific state be set up before they run -- is this possible to do, and how would I go about doing it? Thanks for any & all help, Doug. ___ rspec-users mailing list rspec-users@rubyforge.org h

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-28 Thread doug livesey
up anything I need for my cucumber steps. And the examle above called "seed_fixtures :users", and returned a user, not just a true value. Cheers, Doug. 2009/4/27 doug livesey > Yeah, I take your point, but I would need to set that up with fixtures, > wouldn't I? >

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
moment it's quick & uncomplicated, and I think that current_user returning true is fairly self-explanatory -- maybe returning :a_logged_in_user would be less evil. & my attitude there might have more to do with the time here being a half-hour off of midnight than conscientiousness! ;) Doug

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
Cheers, Doug. 2009/4/27 doug livesey > Except I'm now struggling with how it should work, sorry. > The step for the scenario looks like this: > > Given /^that a user is logged in to the session$/ do > controller.stub!( :current_user ).and_return( true ) > end > >

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
m the ApplicationController#authorise method, it returns nil. I've tried just stubbing out the authorise method, too, but that doesn't seem to work, either. Am I approaching this the wrong way? & cheers again, Doug. 2009/4/27 doug livesey > & that nailed it, cheers man! >Dou

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
& that nailed it, cheers man! Doug. 2009/4/27 doug livesey > > Please be sure to clip the relevant parts when responding - "all of > > that" is only meaningful if I look at the other email in this thread. > > Easy on my desk top. Not so easy on my phone. &

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
> Please be sure to clip the relevant parts when responding - "all of > that" is only meaningful if I look at the other email in this thread. > Easy on my desk top. Not so easy on my phone. Bit too used to gmail threads, sorry! Doug.

Re: [rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
Cheers for that -- I'll give it a try. Would all of that be in the step file? (Total cucumber newbie, sorry!) Cheers, Doug. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] cucumber/webrat, need to set user in session, can't stub or mock. Fixtures?

2009-04-27 Thread doug livesey
with cucumber? Thanks for any & all help, Doug. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Why RSpec?

2009-04-22 Thread doug livesey
gression tests) in a much more intuitive way than Test::Unit -- I don't know Shoulda. But if I understood all the pros & cons of two systems & preferred another, I'd use that -- there's no gun against anyone's head. ;) Doug. 2009/4/22 Saturn > I am also having sam

Re: [rspec-users] Fwd: How do you mock an object to expect A then B then A?

2009-04-14 Thread doug livesey
is in contributing a patch back..I guess I > raise a ticket in lighthouse. > > 2009/4/14 doug livesey > > Could be wrong, but what about removing the stipulation that each call >> should be received once? >> Is that superfluous to requirements, there? I think so. >>

Re: [rspec-users] Fwd: How do you mock an object to expect A then B then A?

2009-04-14 Thread doug livesey
Could be wrong, but what about removing the stipulation that each call should be received once? Is that superfluous to requirements, there? I think so. You've already specified three calls in order, so that should cover it. 2009/4/14 Nigel Thorne > Hi Folks, > > I want to assert on an order of i

Re: [rspec-users] updated to latest gems, rspec not catching flash.now

2009-04-09 Thread doug livesey
Didn't spot this when you replied earlier -- cheers for that! Doug. 2009/4/8 Zach Dennis > On Wed, Apr 8, 2009 at 2:08 PM, doug livesey wrote: > > Hi, after an update to all the latest gems, I have a controller spec > failing > > that wasn't previously: >

Re: [rspec-users] RSpec-Rails 1.2.2 and Controllers without views - what to do?

2009-04-08 Thread doug livesey
Hi. Bira -- just got the same problem myself, and have found that (whilst not a perfect solution) that stubbing out render on the controller in my before block solves it. controller.stub!( :render ) HTH, Doug. 2009/4/1 Bira > I'm trying to upgrade to RSpec 1.2.2 in a Rails app, and

[rspec-users] updated to latest gems, rspec not catching flash.now

2009-04-08 Thread doug livesey
Hi, after an update to all the latest gems, I have a controller spec failing that wasn't previously: flash[:alert].should eql( "Blah blah." )** The flash is being set by "flash.now[:alert] = '...'" in this instance. Can anyone suggest how I can ma

Re: [rspec-users] Speccing the format portion of a controller

2009-02-08 Thread doug livesey
Groovy!Cheers, Doug. 2009/2/7 David Chelimsky > On Sat, Feb 7, 2009 at 10:20 AM, Pat Maddox wrote: > > On Sat, Feb 7, 2009 at 3:16 AM, doug livesey wrote:. > > > > def do_get > > get :index, :format => "xml" > > end > > > > s

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread doug livesey
Well, I can guarantee that it's better than any home-grown solution I would attempt, so I'll be happy w/ that for now! ;)Cheers again, Doug. 2009/2/7 David Chelimsky > On Feb 7, 2009, at 10:00 AM, doug livesey wrote: > > Cheers for that -- that's what I thought was t

Re: [rspec-users] Speccing the format portion of a controller

2009-02-07 Thread doug livesey
Cheers for that -- that's what I thought was the hacky solution! ;)I'm now reassured that I'm not being evil -- thanks! Doug. 2009/2/7 David Chelimsky > On Sat, Feb 7, 2009 at 5:16 AM, doug livesey wrote: > > Hi -- I have a hacky work-around for this, but wondere

[rspec-users] Speccing the format portion of a controller

2009-02-07 Thread doug livesey
Hi -- I have a hacky work-around for this, but wondered if anyone could tell me the canonical way of sending the get/put/etc. portion of a spec with format information.I guess with something that might look like this: def do_get get :index, :format => :xml end Cheers, D

Re: [rspec-users] OK... What is ... fu ?

2009-01-30 Thread doug livesey
And of course the pinnacle of geekdom is to be known as a 'poodle', or one who is skilled in being skilled; a fu-fu.Damn', I appear to be posting drunk again ... 2009/1/30 Rick DeNatale > > > On Fri, Jan 30, 2009 at 10:06 AM, David Chelimsky wrote: > >> On Fri, Jan 30, 2009 at 8:49 AM, James Byr

Re: [rspec-users] [ANN] The RSpec Book is now in beta

2009-01-29 Thread doug livesey
Just bought it -- been looking forwards to this! 2009/1/29 David Chelimsky > On Thu, Jan 29, 2009 at 9:55 AM, Nick Hoffman wrote: > > On 29/01/2009, at 10:36 AM, David Chelimsky wrote: > >> > >> I'm pleased to announce the beta release of the Pragmatic Bookshelf's > The > >> RSpec Book: Behavio

Re: [rspec-users] maybe I 'get it' after all

2009-01-11 Thread doug livesey
> I hope I'm not the only one in the world who posts to a discussion list > only to (maybe) get the answer to a question moments after hitting > posting. Sigh. Hey, that's my trick! Get your own! 2009/1/11 Tom Cloyd > I hope I'm not the only one in the world who posts to a discussion list > only

Re: [rspec-users] Happy Christmas Thread

2008-12-25 Thread doug livesey
I can't tell you what a relief that was. 2008/12/25 Stephen Eley > On Thu, Dec 25, 2008 at 3:41 PM, doug livesey wrote: > >> Cucunuts > > I can't help thinking that there must be a way to further abbreviate that > > Cooks. > > > > -- > Have Fun,

Re: [rspec-users] Happy Christmas Thread

2008-12-25 Thread doug livesey
> CucunutsI can't help thinking that there must be a way to further abbreviate that ... 2008/12/25 Pat Maddox > Cucunuts > > > On 12/25/08, doug livesey wrote: > > Cucumberistas, surely? > > > > 2008/12/25 Jay Levitt > > > >> Andrew Premda

Re: [rspec-users] Happy Christmas Thread

2008-12-25 Thread doug livesey
Cucumberistas, surely? 2008/12/25 Jay Levitt > Andrew Premdas wrote: > >> Happy X-MAS all you rspeccers and cucumberists :-) >> > > > I believe that's "cucus". > > Jay > ___ > rspec-users mailing list > r

[rspec-users] Speccing a respond_to block outside of a request

2008-07-24 Thread Doug Livesey
thing is the index method. Cheers for any & all assistance, Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Is there an equivalent to anything() for Hash parameters

2008-06-10 Thread Doug Livesey
Just a final word -- updated to the latest RSpec, and have been *loving* hash_including()! Cheers again for those responses! Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org

[rspec-users] Using and_yield to pass multiple or no iterations

2008-06-05 Thread Doug Livesey
@egg.stub!( :each_row ). and_yield( :first_value ). and_yield( :second_value ). and_yield( :third_value ) @egg.do_thing.should be_true end As you can see, my understanding of and_yield() is *very* imperfect, so any & all pointers are very gratefully received. Cheers, Do

Re: [rspec-users] Error when trying to get the install RSpec from Github

2008-05-23 Thread Doug Livesey
Ticket files -- #407. & cheers for the link, man -- I'll check that now. Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Error when trying to get the install RSpec from Github

2008-05-23 Thread Doug Livesey
.tmbundle: Cannot stat: No such file or directory tar: Error exit delayed from previous errors Can anyone advise me on how to get around this? Cheers, Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Is there an equivalent to anything() for Hash parameters

2008-05-23 Thread Doug Livesey
d my memory on matchers, anyway! Thanks again for the help, there. Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Is there an equivalent to anything() for Hash parameters?

2008-05-23 Thread Doug Livesey
e( :find ).with( :all, { :conditions => "name LIKE '%rt%", anything } ) Model.should_receive( :find ).with( :all, { anything, :order => 'name' } ) If anyone knew a way of generating that sort of behaviour, I'd be *v

Re: [rspec-users] mock_model not stubbing model attribtues in view spec

2008-05-20 Thread Doug Livesey
Wow, did I ever have *that* wrong, then! Thanks for all those replies -- stub_model looks like the ticket I was after, in that case. Cheers again, Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users

[rspec-users] mock_model not stubbing model attribtues in view spec

2008-05-20 Thread Doug Livesey
(Maybe it's supposed to be like this for views?) Cheers, Doug. -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] mocking successive return values

2008-03-05 Thread Doug Bryant
@mock.should_receive(:multi_call).twice.with(:no_args).and_return([8, 12]) @mock.multi_call.should_equal 8 @mock.multi_call.should_equal 12 @mock.__verify end Any feedback on how to properly test this is much appreciated. Thanks, Doug

Re: [rspec-users] mocking successive return values

2008-03-05 Thread Doug Bryant
Thanks Ben. I appreciate it. Doug On Wed, Mar 5, 2008 at 1:25 PM, Ben Mabey <[EMAIL PROTECTED]> wrote: > Doug Bryant wrote: > > I'm having a problems mocking successive return values. I don't know > > if I'm doing something wrong or if this is a limitati

[rspec-users] mocking successive return values

2008-03-05 Thread Doug Bryant
l).twice.with(:no_args).and_return([8, 12]) @mock.multi_call.should_equal 8 @mock.multi_call.should_equal 12 @mock.__verify end Any feedback on how to properly test this is much appreciated. Thanks, Doug ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Cannot build trunk

2007-09-22 Thread Doug Wright
y with Story Runner, I'd greatly appreciate it. Again, I apologize if these are overly newbie questions. I'm not very experienced with subversion and relatively new to rails - but absolutely loving rspec! Thanks! -Doug Wright ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] rspec-users Digest, Vol 13, Issue 44

2007-07-31 Thread Doug Cole
Thanks. I was hoping someone else who was using observers and rspec had run into this before and had a solution, as I always prefer the lazy way when possible ;). I'll take a look at the rspec code base and see if I can figure it out well enough to submit a patch. Doug > > On 7/31/07

Re: [rspec-users] Stubbing Observers in rails?

2007-07-31 Thread Doug Cole
If I'm not mistaken those stub them out always - I'd like to be able to stub them out for most tests, but I would like to have them around when I want to write tests for the observers themselves! I imagine this is a fairly common use case for Observers and testing. >If you're looking to stub all

[rspec-users] Stubbing Observers in rails?

2007-07-30 Thread Doug Cole
In most of my tests I'd like to be able to stub out the observers for my models, but I'm not sure the best way to do this. I doesn't look like there is a way to stub all instance methods, and I don't seem to be able to stub early enough to stub out the observer as it's instantiated. I can think o