Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-29 Thread Pat Nakajima
(Sorry if this is double-posted, I was having trouble with joining the list) If you want an easy way to test ActiveRecord extensions, check out acts_as_fu: http://github.com/nakajima/acts_as_fu. It makes generating ActiveRecord models dead simple. Pat On Jan 29, 10:18 pm, Ben Mabey wrote: > Jam

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

2009-01-30 Thread Pat Nakajima
Speaking as the author of a "-fu" project, I'll say that I named acts_as_fu that way because it aids the creation of ActiveRecord extensions, which very commonly have names starting with "acts_as" or ending with "fu". This sort of meta-extension of that workflow means that you can look at it in two

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-30 Thread Pat Nakajima
rne wrote: > Pat Nakajima wrote: > > If you want an easy way to test ActiveRecord extensions, check out > > acts_as_fu:http://github.com/nakajima/acts_as_fu. It makes generating > > ActiveRecord models dead simple. > > This seems to work very well.  However, I am causing mys

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-30 Thread Pat Nakajima
After taking another look, I think you may be able to do something like this to test your logger: https://gist.github.com/3c55cbec990f283c5399 Let me know if that works. Pat On Jan 30, 11:10 am, James Byrne wrote: > Pat Nakajima wrote: > > If you want an easy way to test Act

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-30 Thread Pat Nakajima
James, Can you show me how you're trying to use ActsAsFu? Pat On Jan 30, 11:52 am, James Byrne wrote: > Pat Nakajima wrote: > > If you want an easy way to test ActiveRecord extensions, check out > > acts_as_fu:http://github.com/nakajima/acts_as_fu. It makes generating >

Re: [rspec-users] RSpec - Testing ActiveRecord addins

2009-01-30 Thread Pat Nakajima
stamps } @person = Person.create! end it "adds created_at" do @person.created_at.should_not be_nil end it "adds updated_at" do @person.updated_at.should_not be_nil end end Pat On Jan 30, 3:24 pm, James Byrne wrote: > Ja

Re: [rspec-users] Fixjour and others

2009-02-08 Thread Pat Nakajima
I started writing up a response about why I wrote Fixjour, and why I want it to be its own project, but it got really long. Here's a Markdownified gist: http://gist.github.com/60389. For the record, I think FR is a great tool (I link to it in Fixjour's README), it's just not for me. Read the gist

Re: [rspec-users] Fixjour and others

2009-02-08 Thread Pat Nakajima
y, but because I'm not sure if it should be more explicit. Pat On Sun, Feb 8, 2009 at 3:44 PM, Scott Taylor wrote: > Pat Nakajima wrote: >> >> I started writing up a response about why I wrote Fixjour, and why I >> want it to be its own project, but it got really long

Re: [rspec-users] issues with the trunk of rspec-rails

2009-02-10 Thread Pat Nakajima
> > (3) with_tag is completely broken, as it tries to use the outer class as > the subject of 'with_tag', rather than the have_tag matcher that it lives > inside. > If you're testing markup (view tests or whatever), take a look at my elementor project[1]. I've found that it makes view testing a lo

Re: [rspec-users] [Cucumber] Webrat / Watir - generating page images

2009-02-26 Thread Pat Nakajima
Here's the step I use for taking screenshots: https://gist.github.com/dff2a429afff1c212416. On Wed, Feb 25, 2009 at 10:49 PM, Arco wrote: > I am using Cucumber with Webrat/Watir/Celerity for UI testing. > > I would like to generate an error report which shows the page image > for each failed test

Re: [rspec-users] [Cucumber] Webrat / Watir - generating page images

2009-02-26 Thread Pat Nakajima
(I extracted the method in the Gist, so it may be a bit off) On Thu, Feb 26, 2009 at 12:21 PM, Pat Nakajima wrote: > Here's the step I use for taking screenshots: > https://gist.github.com/dff2a429afff1c212416. > > On Wed, Feb 25, 2009 at 10:49 PM, Arco wrote: >> I am usi

Re: [rspec-users] Sinitra 0.9.1 Webrat 0.4.2 Cuc problem

2009-03-03 Thread Pat Nakajima
For what it's worth, here's how I had to hack Webrat to get my Sinatra 0.9.1 app working properly: http://gist.github.com/73735. On Tue, Mar 3, 2009 at 11:39 PM, Andrew Premdas wrote: > Have created sample sinatra cucumber app as suggested on wiki. Tried both > env.rb configurations from there a

Re: [rspec-users] Sinitra 0.9.1 Webrat 0.4.2 Cuc problem

2009-03-04 Thread Pat Nakajima
Rob, Is your Sinatra app using the "classic" style? If so, I think it would work without need for modification. If your app is a class that inherits from Sinatra::Base, you're likely to see issues unless you take the steps in the Gist. Pat On Mar 4, 2009, at 4:43 AM, Rob Holland wrote:

Re: [rspec-users] have_tag + quantity - question

2009-03-06 Thread Pat Nakajima
I've posted it on this list before, but if you're writing view tests, check out Elementor: http://pivotallabs.com/users/patn/blog/articles/608-better-view-testing-with-elementor. It provides a much cleaner way of asserting on markup, and doesn't require you to litter your expectations with CSS sele

Re: [rspec-users] custom, nested HTML matchers in RSpec

2009-03-09 Thread Pat Nakajima
> > Has anyone tried this? is it useful? > It looks interesting, though it could be confused for trying to exactly mimic the actual markup, not just specify interesting parts. On Mon, Mar 9, 2009 at 7:20 PM, Phlip wrote: > http://gist.github.com/76136 >> > > response.body.should be_html_wit