Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread Edward Ocampo-Gooding
> I'm looking through my specs and they work great, but they don't read > as English. I'm wondering how others are phrasing these. Here are > some examples: > > describe Agent do >it 'should be possible to create one' do >end > end Does describe Agent do it 'should be createable'

Re: [rspec-users] Wording describe/it so specdocs look good

2007-07-05 Thread Edward Ocampo-Gooding
ible for the same user to rate the same > agent twice with same kind of transaction" > > The English grammar gets a bit twisty. Perhaps: > > Agent "should not allow the same user to rate the same agent twice > with the same kind of transaction" > > T

[rspec-users] raise_controller_errors

2007-07-09 Thread Edward Ocampo-Gooding
Hi Folks, I think I've run into a problem after upgrading to edge rspec [revision 2160], but I'm not sure where to fix things. Default controller specs that look like this: require File.dirname(__FILE__) + '/../spec_helper' describe

Re: [rspec-users] raise_controller_errors

2007-07-09 Thread Edward Ocampo-Gooding
David Chelimsky wrote: > Did you run "ruby script/generate rspec"? Yep; but this time I let it regenerate spec.opts Turns out that the --drb flag is the culprit. I'll file (or look for a similar) bug report. Edward ___ rspec-users mailing list rspec-

Re: [rspec-users] raise_controller_errors

2007-07-09 Thread Edward Ocampo-Gooding
David Chelimsky wrote: > On 7/9/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >> David Chelimsky wrote: >>> Did you run "ruby script/generate rspec"? >> Yep; but this time I let it regenerate spec.opts >> >> Turns out that the --drb flag

[rspec-users] have_tag for href with specific link?

2007-07-22 Thread Edward Ocampo-Gooding
Hi folks, I'm trying out this idea of "outside-in" and writing specs for my views first. Being a person who generally starts with some scribbles of a user interface and moves right to models, this has yet to be fun, but I'm giving it a shot. My question: I'm trying to specify that an index pag

Re: [rspec-users] have_tag for href with specific link?

2007-07-22 Thread Edward Ocampo-Gooding
Hans de Graaff wrote: > On Sun, 2007-07-22 at 03:00 -0400, Edward Ocampo-Gooding wrote: > >> My question: I'm trying to specify that an index page should show a list >> of things, each with a link to a delete action. How would my have_tag >> (or whatever

[rspec-users] :render expects possible?

2007-08-01 Thread Edward Ocampo-Gooding
Hi, Is it possible to do the following in a controller spec? @controller.should_receive(:render).with(:layout => false) I've been trying this kind of thing and it looks like RSpec is messing with the render calls, and requires you to use render_template instead. Could we have at least a war

Re: [rspec-users] :render expects possible?

2007-08-01 Thread Edward Ocampo-Gooding
David Chelimsky wrote: > On 8/1/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >> Hi, >> >> Is it possible to do the following in a controller spec? >> >>@controller.should_receive(:render).with(:layout => false) >> >> I'v

Re: [rspec-users] Test Rendering nothing in Rails

2007-08-02 Thread Edward Ocampo-Gooding
Hi Shane, (I'll continue with the top-posting, but I think it should be discouraged.) As David just mentioned to me in the response to a related question, you might want to check out @controller.expects_render which is now available in rspec trunk. While the response.body.should be_empty k

Re: [rspec-users] :render expects possible?

2007-08-02 Thread Edward Ocampo-Gooding
Could we have at least a warning that mentions that parameters passed to :render expectations are going to be thrown away and mention an alternative way of spec-ing this behaviour? >>> In trunk, when you call should_receive(:render) you will get an error >>> saying you should use the

[rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb

2007-08-14 Thread Edward Ocampo-Gooding
Before I chalk this up as a bug and report it, I just want to make sure I'm not doing something silly. Running ZenTest's autotest on OS 10.4.10 with RSpec 1.0.8, drb, produces the following failed test: ActiveRecord::AssociationTypeMismatch in 'User should create an avatar with uploaded_data'

Re: [rspec-users] AssociationTypeMismatch with RSpec 1.0.8, autotest running with drb

2007-08-14 Thread Edward Ocampo-Gooding
aslak hellesoy wrote: > On 8/14/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >> Before I chalk this up as a bug and report it, I just want to make sure I'm >> not >> doing something silly. >> >> Running ZenTest's autotest on OS 10.4.10

[rspec-users] describing a mock_model as being an instance

2007-08-19 Thread Edward Ocampo-Gooding
Is there a built-in way of describing a mock_model as being an instance, beyond stubbing the eval("Object.methods - Object.new.methods") methods to throw NoMethodErrors? Edward ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.or

Re: [rspec-users] describing a mock_model as being an instance

2007-08-19 Thread Edward Ocampo-Gooding
David Chelimsky wrote: > On 8/19/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >> Is there a built-in way of describing a mock_model as being an instance, >> beyond >> stubbing the eval("Object.methods - Object.new.methods") methods to throw >>

Re: [rspec-users] describing a mock_model as being an instance

2007-08-21 Thread Edward Ocampo-Gooding
Courtenay wrote: > Is there a reason it needs to be more complicated than this? > > class Foo > end > > Foo.is_a?(Class) > => true > > Foo.new.is_a?(Class) > => false You can do that? Whoa... That totally makes sense. I also found out about Object#instance_of? yesterday. Thanks for the ti

[rspec-users] mock_model in spec/lib

2007-08-30 Thread Edward Ocampo-Gooding
Has anyone else run into a problem with trying to use mock_model in spec/lib ? For some reason, I can take the same spec, put it in spec/models, have it run fine, but put it in spec/lib, and have it complain about not being able to find #mock_model Thanks, Edward ___

Re: [rspec-users] mock_model in spec/lib

2007-08-30 Thread Edward Ocampo-Gooding
David Chelimsky wrote: > On 8/30/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >> Has anyone else run into a problem with trying to use mock_model in spec/lib >> ? >> For some reason, I can take the same spec, put it in spec/models, have it run >> fine, bu

Re: [rspec-users] mock_model in spec/lib

2007-08-30 Thread Edward Ocampo-Gooding
Jay Levitt wrote: > David Chelimsky wrote: >> On 8/30/07, Jay Levitt <[EMAIL PROTECTED]> wrote: >>> Edward Ocampo-Gooding wrote: >>>> David Chelimsky wrote: >>>>> On 8/30/07, Edward Ocampo-Gooding <[EMAIL PROTECTED]> wrote: >>>>&

[rspec-users] shared behaviour for all views

2007-12-04 Thread Edward Ocampo-Gooding
Is there a way I can write something like a shared behaviour for all views that just checks the page responds with a 200 status and has a title, meta tags, and an h1? Here's an idea for a shared behaviour (that only applies if I set views to use it manually with it_should_behave_like "a standar

Re: [rspec-users] DRb does not activate using options file

2008-02-05 Thread Edward Ocampo-gooding
On Jan 30, 2008 7:43 PM, Luis Lavena <[EMAIL PROTECTED]> wrote: > Hello List, > > For a small project I've been using 'ruby script/spec -X spec' to > execute my specs. > > Now that I added ZenTest on it, found that the test takes longer to > run due the complete load of test environment. > > Since