> 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'
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
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
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-
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
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
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
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
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
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
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
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'
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
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
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
>>
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
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
___
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
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:
>>>>&
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
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
21 matches
Mail list logo