Re: [rspec-users] Can I set an expectation that a method invokes super?

2010-01-30 Thread Matt Patterson
type situation the right stuff happens across the whole stack. HTH Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] testing controllers using cucumber

2010-01-29 Thread Matt Patterson
ame("Joe").should_not be_nil end > In this how i need to call the users controller and in that create > method. > Also i searched in the net but didn't found any examples for cucumber > testing controllers. There are lots of example

Re: [rspec-users] describe "RSpec's documentation" do

2010-01-07 Thread Matt Patterson
On 7 Jan 2010, at 00:53, Matt Wynne wrote: > On 5 Jan 2010, at 12:17, Matt Patterson wrote: > >> I've been looking at the documentation again recently, and I'd be happy to >> start work on this, particularly if Matt W is wanting to look at the >> cucumber en

Re: [rspec-users] describe "RSpec's documentation" do

2010-01-05 Thread Matt Patterson
n on the executable documentation aspects of this, and I did a whole load of work back in 2008 on this kind of stuff using RSpec, so I've got a bit of history here :-) Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] bypass_rescue and its inverse

2009-03-20 Thread Matt Patterson
On 20 Mar 2009, at 06:46, Matt Patterson wrote: Such a boon, in fact, that I immediately shoved bypass_rescue into a global before :each block so that my controller specs would do what I expect by default. However, that makes my speccing of the rescue_from code a little trickier. Is

Re: [rspec-users] [cucumber] Creating an item without worrying about validity?

2009-03-20 Thread Matt Patterson
perience of being refused... Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] bypass_rescue and its inverse

2009-03-19 Thread Matt Patterson
Bit unawake yet, may follow up with an answer to my own question when I've imbibed the caffeine. -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyfor

Re: [rspec-users] Cucumber failing with 'uninitialized constant Spec::Ruby'

2009-03-18 Thread Matt Patterson
On 18 Mar 2009, at 21:07, David Chelimsky wrote: On Wed, Mar 18, 2009 at 3:54 PM, Matt Patterson wrote: I've just upgraded RSpec to 1.2 on a Rails 2.2.2 app. rake features fails with the following error: /Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/ dependenci

[rspec-users] Cucumber failing with 'uninitialized constant Spec::Ruby'

2009-03-18 Thread Matt Patterson
1.16 and 0.2, has anyone else seen this? I'll start poking later, but if anyone's seen it and has a super-easy diagnosis/fix that would be awesome. Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec

Re: [rspec-users] another noob question about stubs

2008-04-29 Thread Matt Patterson
roller.stub! (:authenticate_with_open_id ).and_yield(:result, :identity_url, :registration) so that the code in the block actually gets run (a normal stub, or one with and_return with simply eat the block). Obviously, make sure that it's yielding the values you want it to. HTH Matt -- Matt Pa

[rspec-users] Passing options into Story Runner (like --format)

2008-02-27 Thread Matt Patterson
to Lighthouse Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] specs on private methods

2008-01-08 Thread Matt Patterson
aviour, where it occurs, > and let the object implement it as it wants (using private methods or > any other mechanism). > If the object were to implement it itself, that would be great ;-) Unfortunately, I have to implement the innards, and I'm rubbish so I like to test things...

Re: [rspec-users] specs on private methods

2008-01-08 Thread Matt Patterson
.jayfields.com/2007/11/ruby-testing-private-methods.html) In which he basically redeclares the private methods public for the duration of the test only, with a bit of block-scoped evaling goodness. Matt -- Matt Patterson | Design & Code |

Re: [rspec-users] Problems with rspec 1.1 required inside rake tasks

2008-01-08 Thread Matt Patterson
e rspec.rake Hoe / newgem threw in) That does the trick, rake spec still works, and I can run other rake tasks without explosions. I'd still like to know whether this is a bug or if there's a change in require best practice... I'll file a bug if it is... Matt -- Mat

[rspec-users] Problems with rspec 1.1 required inside rake tasks

2008-01-08 Thread Matt Patterson
t; Note that the spec runner is trying to load 'check_manifest', the argument to rake... The reason is that rspec-1.1.1/lib/spec.rb's at_exit hook is being invoked by, I presume, require 'spec' Is there a better way to require rspec (this worked

Re: [rspec-users] RSpec seems to be having a hard time loading Helper classes

2007-10-11 Thread Matt Patterson
called in place of ProjectHelper. Anyway, whatever it is, you need to make sure that the class/module name following 'describe' in your helper spec is actually defined somewhere. Matt -- Matt Patterson | Design & Code | http://www.reprocessed.org/

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

2007-10-09 Thread Matt Patterson
the integration point between layouts and views, and we're primarily testing them in isolation (a good thing...) I was mainly wondering if anyone had some great practices in testing those integration points, and layout stuff in general, that I could learn from... Matt -- Mat

[rspec-users] Testing layouts with RSpec on Rails

2007-10-09 Thread Matt Patterson
Hey guys, Does anyone have any wisdom to share on the subject of speccing Rails layouts? Most of it's plain old view specs stuff, but are there sensible ways to verify things like the yield call? (Mocking doesn't catch that) Thanks, Matt -- Matt Patterson | Design & C

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread Matt Patterson
tal coverage | Code coverage /Users/matt/.autotest | 133 | 103 | 48.9% | 37.9% I've sent the zip (direct to you) anyway, but there's your problem... rake verify_rcov is running rcov on my ~/.autotest file for some reason... Matt -- Matt Pat

Re: [rspec-users] Problems with expect_render

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

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread Matt Patterson
r/local/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7 /usr/local/bin/rake:16:in `load' /usr/local/bin/rake:16 rake aborted! RSpec Core pre_commit failed /Users/matt/sandbox/rspec-1.0.8/rakefile:9 -- Matt Patterson | Design & Code | http://www.reprocessed.org/ ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread Matt Patterson
On 25 Sep 2007, at 17:00, David Chelimsky wrote: > Oh - I forgot about that - it actually should work :) Heh. >> Can you give me some pointers on getting the tests to run cleanly? > > What platform are you on? OS X, with Ruby 1.8.6 Matt -- Matt Patterson | Design &a

Re: [rspec-users] Problems with expect_render

2007-09-25 Thread Matt Patterson
On 25 Sep 2007, at 16:57, Matt Patterson wrote: > On 25 Sep 2007, at 16:06, David Chelimsky wrote: >> >> It is not documented as such, but expect_render does not work with >> mocha. It uses rspec's underlying mock framework. > > Yes, I knew about that, but the rdoc

Re: [rspec-users] Problems with expect_render

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

[rspec-users] Problems with expect_render

2007-09-25 Thread Matt Patterson
ot;does_not_exist", :object=>"hello"}) once, but received > it 0 times Which is much better. So, to me, this looks like a bug in rspec_on_rails. Explanations of why I'm just doing it wrong gratefully received ;-) Matt -- Matt Patterson | Design & Code