osdir.com
mailing list archive F.A.Q. -since 2001!



Subject: Re: [ANN] rspec_hpricot_matchers 1.0: have_tag
on hpricot - msg#00399

List: lang.ruby.rspec.user

Mail Archive Navigation:
by Date: Prev Next Date Index by Thread: Prev Next Thread Index

On Wed, Mar 26, 2008 at 7:50 PM, Ashley Moran
<ashley.moran-xOz895CaznhVmqsniUryyw@xxxxxxxxxxxxxxxx> wrote:
>
> On 26 Mar 2008, at 19:08, Kyle Hargraves wrote:
>
> > I finally got around to registering a project on RubyForge and pushing
> > a gem, so it is now available with just:
> >
> > gem install rspec_hpricot_matchers
>
>
> Hi Kyle
>
> Thanks for releasing this as a gem, makes it much easier to get hold
> of. The only deficiency in it that bugs me is the poor error
> reporting for nested specs, but that would be pretty tough to fix.
> (I'd love to think I could add that but not sure I will get time.)
>
> I still think this should be in RSpec core though, hint hint
> David ;o) Is there any chance it will make it in?

Not likely. Not because it isn't awesome. I'll probably be using it
myself. But every good idea for a matcher library doesn't belong in
rspec. In fact, the whole point of creating such a simple protocol for
matchers was to encourage external libraries.

I think it's fine just as it is.

FWIW,
David

> Making assertions
> about XML data is pretty common doing both web-based and non-web-based
> apps. Plus of course there is the little issue that Rails'
> assert_select doesn't *actually work*, which is generally considered a
> requirement for a testing library.




>
> Ashley
>
>
>
> _______________________________________________
> rspec-users mailing list
> rspec-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx
> http://rubyforge.org/mailman/listinfo/rspec-users
>


Thread at a glance:

Previous Message by Date:

Re: Trouble with my first Story

It actually should do a redirect, but checking for response.should be_success also fails. The request isn't actually being made. I just can't figure out why. Glenn On Mar 26, 2008, at 8:19 PM, Matt Berther wrote: > Hi Glen, > > I do not mean to insult you, but is /session/create actually doing a > redirect? A similar rspec test works for me. > > -- > Matt Berther > http://www.mattberther.com > > > > > On Mar 26, 2008, at 5:51 PM, Glenn Ford wrote: > >> On Mar 26, 2008, at 6:28 PM, Chuck Remes wrote: >> >>> >>> On Mar 26, 2008, at 4:02 PM, Glenn Ford wrote: >>>> Hi all! I've been through the RSpec Stories PeepCode and some >>>> various >>>> other readings online, and now I'm trying to build a dummy >>>> application >>>> of the traditional style: log in, make posts, add comments. >>>> >>>> So I've run the scaffold for posts/comments and the script for >>>> RestfulAuthentication so I have the users and SessionController and >>>> all that set up in this project. Now I've written this story: >>>> >>>> http://pastie.caboo.se/pastes/171140 >>>> >>>> In it I'm trying to do a post to "/session/create" in order to log >>>> in. I figure I want to be able to call this from an Story so >>>> that I >>>> can reuse it for different scenarios when I want to test things >>>> requiring login. >>>> >>>> What am I doing wrong here? >>> >>> Glenn, >>> >>> please include a pastie that shows the error you are getting or the >>> behavior that isn't working. >>> >>> cr >> >> Oh sorry about that... it was there before I promise :) >> >> FAILURES: >> 1) User Stuff (Create a new user) FAILED >> Spec::Expectations::ExpectationNotMetError: expected redirect? to >> return true, got false >> stories/user_story.rb:34:in `I should be logged in' >> stories/user_story.rb:31 >> stories/user_story.rb:3 >> >> _______________________________________________ >> rspec-users mailing list >> rspec-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx >> http://rubyforge.org/mailman/listinfo/rspec-users > > _______________________________________________ > rspec-users mailing list > rspec-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > http://rubyforge.org/mailman/listinfo/rspec-users

Next Message by Date:

Re: Trouble with my first Story

On Wed, Mar 26, 2008 at 5:02 PM, Glenn Ford <glenn-7MMFcF0XQUZBDgjK7y7TUQ@xxxxxxxxxxxxxxxx> wrote: > Hi all! I've been through the RSpec Stories PeepCode and some various > other readings online, and now I'm trying to build a dummy application > of the traditional style: log in, make posts, add comments. > > So I've run the scaffold for posts/comments and the script for > RestfulAuthentication so I have the users and SessionController and > all that set up in this project. Now I've written this story: > > http://pastie.caboo.se/pastes/171140 Shouldn't that be a post to "/sessons/"? > > In it I'm trying to do a post to "/session/create" in order to log > in. I figure I want to be able to call this from an Story so that I > can reuse it for different scenarios when I want to test things > requiring login. > > What am I doing wrong here? > > Thanks! > Glenn > _______________________________________________ > rspec-users mailing list > rspec-users-GrnCvJ7WPxnNLxjTenLetw@xxxxxxxxxxxxxxxx > http://rubyforge.org/mailman/listinfo/rspec-users >

Previous Message by Thread:

Re: [ANN] rspec_hpricot_matchers 1.0: have_tag on hpricot

On 26 Mar 2008, at 19:08, Kyle Hargraves wrote: > I finally got around to registering a project on RubyForge and pushing > a gem, so it is now available with just: > > gem install rspec_hpricot_matchers Hi Kyle Thanks for releasing this as a gem, makes it much easier to get hold of. The only deficiency in it that bugs me is the poor error reporting for nested specs, but that would be pretty tough to fix. (I'd love to think I could add that but not sure I will get time.) I still think this should be in RSpec core though, hint hint David ;o) Is there any chance it will make it in? Making assertions about XML data is pretty common doing both web-based and non-web-based apps. Plus of course there is the little issue that Rails' assert_select doesn't *actually work*, which is generally considered a requirement for a testing library. Ashley

Next Message by Thread:

Re: [ANN] rspec_hpricot_matchers 1.0: have_tag on hpricot

On 27/03/2008, David Chelimsky <dchelimsky-Re5JQEeQqe8AvxtiuMwx3w@xxxxxxxxxxxxxxxx> wrote: Not likely. Not because it isn't awesome. I'll probably be using it myself. But every good idea for a matcher library doesn't belong in rspec. In fact, the whole point of creating such a simple protocol for matchers was to encourage external libraries. I think it's fine just as it is.In that case, would a central repository of re-usable matchers be a good idea?  (Maybe just a page on rspec.info?) Ashley
blog comments powered by Disqus

Home | News | Sitemap | FAQ | advertise | OSDir is an Inevitable website. GBiz is too!