Re: [rspec-users] Can't get should redirect_to match to work

2007-08-10 Thread David Chelimsky
On 8/10/07, sbellware <[EMAIL PROTECTED]> wrote: > > Folks, > > I've posted to the simple example I'm working with as well as the spec code > and results here: > http://pastie.caboo.se/86750 > > I can't seem to get this to work. Any ideas? As of some time ago, response.should redirect_to should c

[rspec-users] Can't get should redirect_to match to work

2007-08-10 Thread sbellware
Folks, I've posted to the simple example I'm working with as well as the spec code and results here: http://pastie.caboo.se/86750 I can't seem to get this to work. Any ideas? Thanks, Scott -- View this message in context: http://www.nabble.com/Can%27t-get-should-redirect_to-match-to-work-tf4

Re: [rspec-users] How to spec a model method

2007-08-10 Thread David Chelimsky
On 8/10/07, David Parker <[EMAIL PROTECTED]> wrote: > Still new to Specs... > How do I create a spec to test a model method? Specifically, here is my > spec: > #testing model > describe User do >it "should have many user roles" do > User.reflect_on_association (:user_roles).should_not be_n

[rspec-users] How to spec a model method

2007-08-10 Thread David Parker
Still new to Specs... How do I create a spec to test a model method? Specifically, here is my spec: #testing model describe User do it "should have many user roles" do User.reflect_on_association(:user_roles).should_not be_nil end it "should have many roles though user roles" do Use

Re: [rspec-users] Using rcov and ouput to screen

2007-08-10 Thread barsalou
Sorry I left off the subject by accident...hopefully this will connect to the thread. Mike B. - Forwarded message from [EMAIL PROTECTED] - Date: Fri, 10 Aug 2007 14:33:18 -0800 From: barsalou <[EMAIL PROTECTED]> Reply-To: barsalou <[EMAIL PROTECTED]> To: rspec-users@rubyfor

[rspec-users] (no subject)

2007-08-10 Thread barsalou
Scott said: >> I'd like to output my rcov data to the screen in ascii instead of >> html...is that possible using the rake spec:rcov command? > Look at the RSpec gem's rdoc. I believe it is something like > Rake::RcovTask. An option can be provided to give rcov options. Run > rcov --help.

rspec-users@rubyforge.org

2007-08-10 Thread David Chelimsky
On 8/10/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > On Aug 10, 2007, at 3:43 PM, David Chelimsky wrote: > > > On 8/7/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > >> > >> I have the following code, which yields instance eval's the block > >> given: > >> > >> class Foo > >> > >>def bar(&blk)

rspec-users@rubyforge.org

2007-08-10 Thread Scott Taylor
On Aug 10, 2007, at 3:43 PM, David Chelimsky wrote: > On 8/7/07, Scott Taylor <[EMAIL PROTECTED]> wrote: >> >> I have the following code, which yields instance eval's the block >> given: >> >> class Foo >> >>def bar(&blk) >> instance_eval &blk >>end >> >>def baz >> yield >

Re: [rspec-users] Transactional fixtures not working as expected

2007-08-10 Thread Tilmann Singer
* Michael Hamann <[EMAIL PROTECTED]> [20070808 19:46]: > I am quite new to BDD and I just wrote my first tests. Suddenly I > received unexpected results because in a model test I load only > users-fixtures but when the views-fixtures in which I load the > posts-fixtures, are run before this model-t

Re: [rspec-users] Can't seem to spec a ActiveRecord::RecordInvalid exception properly...

2007-08-10 Thread Eivind Uggedal
I asked exactly this question on this list 2 days ago... See http://pastie.caboo.se/85887 for a working example. One has to mock out ActiveRecord::Errors::full_messages for it to work under Rails. Cheers, Eivind Uggedal On 8/9/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/8/07, Fischer,

rspec-users@rubyforge.org

2007-08-10 Thread David Chelimsky
On 8/7/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > I have the following code, which yields instance eval's the block given: > > class Foo > >def bar(&blk) > instance_eval &blk >end > >def baz > yield >end > > end > > The effect of this is that self is reassigned: > > F

rspec-users@rubyforge.org

2007-08-10 Thread David Chelimsky
On 8/7/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > I have the following code, which yields instance eval's the block given: > > class Foo > >def bar(&blk) > instance_eval &blk >end > >def baz > yield >end > > end > > The effect of this is that self is reassigned: > > F

Re: [rspec-users] FixtureScenarios

2007-08-10 Thread Scott Taylor
On Aug 10, 2007, at 10:01 AM, David Chelimsky wrote: > On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: >> Thusfar, my experience with stubbing and mocking has not been a walk >> in the park either. Hopefully this will change when rspec's mocking >> and stubbing matures some more. > > Please

[rspec-users] ActiveRecordAssociationMatcher

2007-08-10 Thread Steve Tooke
I've started to put together a custom expectation matcher for specifying AR associations. Its not quite complete and I really need to put some specs together for it, but I'd appreciate any comments. It lets you spec your associations like this: describe Record do include ActiveRecordAssociation

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-10 Thread David Chelimsky
On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Thanks for your patience trying to resolve this issue. I posted a bug > report here: > > http://rubyforge.org/tracker/index.php?func=detail&aid=12963&group_id=797&atid=3149 I see it - thanks. If you have time now, Lance, pls join the #rspec IR

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-10 Thread Lance Carlson
Thanks for your patience trying to resolve this issue. I posted a bug report here: http://rubyforge.org/tracker/index.php?func=detail&aid=12963&group_id=797&atid=3149 On 8/10/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > On 8/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > About these metho

Re: [rspec-users] FixtureScenarios

2007-08-10 Thread David Chelimsky
On 8/10/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > Thusfar, my experience with stubbing and mocking has not been a walk > in the park either. Hopefully this will change when rspec's mocking > and stubbing matures some more. Please elaborate. What new features are you expecting rspec's mocking

Re: [rspec-users] FixtureScenarios

2007-08-10 Thread Lance Carlson
Thusfar, my experience with stubbing and mocking has not been a walk in the park either. Hopefully this will change when rspec's mocking and stubbing matures some more. Fixtures have always been a source of anger for many railers because they slow down tests, rely on the database and are hard to ma

Re: [rspec-users] Problems with RESTfully generated helpers

2007-08-10 Thread David Chelimsky
On 8/9/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > About these methods requiring arguments? I thought you were able to > reproduce the problems I was having and was also able to reproduce a > working application with no arguments. That is correct. > By default these methods should > not requir

[rspec-users] FixtureScenarios

2007-08-10 Thread Wincent Colaiuta
This may have turned up in the RSS feeds of many of you already, but for those who haven't seen it yet, looks intersting: > The main problem with fixtures, for me, has always been how unfun > they are. They literally suck the fun out of anything they’re > a