Hi all,
Are fixtures not loaded & instantiated in the before block? I thought
they /should/ be :) eg
before(:all) do
[EMAIL PROTECTED], @matt, @it_industry].each { |v| puts v.inspect }
end
it "should ..." do
[EMAIL PROTECTED], @matt, @it_industry].each { |v| puts v.inspect }
end
=>
nil
n
Ian White has just submitted a patch for this. Thanks Ian.
http://rspec.lighthouseapp.com/projects/5645-rspec/tickets/516
Tim.
On Wed, Sep 3, 2008 at 10:41 AM, Tim Haines <[EMAIL PROTECTED]> wrote:
> Hi guys,
>
> After updating to edge rails I've just struck this problem too. I've just
> grabb
Hey list,
I found myself trying to verify there are some non-checked checkboxes
in a template today, and am kinda stumped how to do it :).
A checked checkbox is easy, have_tag('input[type=checkbox]
[checked=checked]). But, an unchecked checkbox hasn't got the checked
attribute at all. And as
On Wed, Sep 3, 2008 at 4:52 AM, Keith McDonnell <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Are fixtures not loaded & instantiated in the before block? I thought they
> /should/ be :) eg
>
> before(:all) do
Try before(:each) instead.
Read the warning at the bottom of
http://rspec.info/documentation/
On Wed, Sep 3, 2008 at 6:56 AM, Bart Zonneveld <[EMAIL PROTECTED]> wrote:
> Hey list,
>
> I found myself trying to verify there are some non-checked checkboxes in a
> template today, and am kinda stumped how to do it :).
> A checked checkbox is easy,
> have_tag('input[type=checkbox][checked=checked
On 3 sep 2008, at 15:28, David Chelimsky wrote:
On Wed, Sep 3, 2008 at 6:56 AM, Bart Zonneveld
<[EMAIL PROTECTED]> wrote:
Hey list,
I found myself trying to verify there are some non-checked
checkboxes in a
template today, and am kinda stumped how to do it :).
A checked checkbox is easy,
On 3 Sep 2008, at 14:31, Bart Zonneveld wrote:
On 3 sep 2008, at 15:28, David Chelimsky wrote:
On Wed, Sep 3, 2008 at 6:56 AM, Bart Zonneveld
<[EMAIL PROTECTED]> wrote:
Hey list,
I found myself trying to verify there are some non-checked
checkboxes in a
template today, and am kinda stum
On Wed, Sep 3, 2008 at 8:38 AM, Matt Wynne <[EMAIL PROTECTED]> wrote:
> On 3 Sep 2008, at 14:31, Bart Zonneveld wrote:
>
>>
>> On 3 sep 2008, at 15:28, David Chelimsky wrote:
>>
>>> On Wed, Sep 3, 2008 at 6:56 AM, Bart Zonneveld <[EMAIL PROTECTED]>
>>> wrote:
Hey list,
I found m
Hi everyone,
I have been trying to find an answer to this question and have not been able
to. Any help is greatly appreciated.
I am using Rails 2.1.0 and Rspec 1.1.4.
How can I set an instance variable in my Rspec test that is then available
to my controller while the test is running? For examp
You don't need to set the instance variable, you can stub the find call:
describe CartController do
describe "index" do
before do
@user = mock_model( User )
end
it "should render 'cart_full' if @user is set" do
# This is where I need to set @user
User.stub!( :find ).with('
On Sep 3, 2008, at 10:40 AM, Maurício Linhares wrote:
You don't need to set the instance variable, you can stub the find
call:
Or you could also stub the call to User::find.
Also - you don't *WANT* to set the instance variable - it's an
encapsulation violation - there is nothing in the p
On Sep 3, 2008, at 10:53 AM, Scott Taylor wrote:
On Sep 3, 2008, at 10:40 AM, Maurício Linhares wrote:
You don't need to set the instance variable, you can stub the find
call:
Or you could also stub the call to User::find.
Also - you don't *WANT* to set the instance variable - it's an
Can you submit a form that has no submit button/image?
--
Zach Dennis
http://www.continuousthinking.com
http://www.mutuallyhuman.com
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On 2008-09-03, at 12:06, Zach Dennis wrote:
Can you submit a form that has no submit button/image?
You can submit a form using Javascript.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
On Wed, Sep 3, 2008 at 12:40 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-09-03, at 12:06, Zach Dennis wrote:
>>
>> Can you submit a form that has no submit button/image?
>
> You can submit a form using Javascript.
That's why we don't have submit buttons. =)
But in the context of webrat,
On 2008-09-03, at 13:15, Zach Dennis wrote:
On Wed, Sep 3, 2008 at 12:40 PM, Nick Hoffman <[EMAIL PROTECTED]>
wrote:
You can submit a form using Javascript.
That's why we don't have submit buttons. =)
But in the context of webrat, if there is a form w/o a submit button,
how can you submit it
On 2008-09-03, at 13:38, Zach Dennis wrote:
When the user clicks a button, but all of the handy dandy work is done
in unobtrusive-style javascript. It's not a submit button. It's a
CSS-made button with listeners attached,
I'm afraid I can't be of much help with that. I've barely used Webrat.
I'm writing specs for a module for my Rails app. The module will live
in lib/ . For now, I've created the directory spec/lib/ to store the
specs for files in lib/ . However, I'm curious to know if there's a
currently accepted location in which to store these types of specs.
Thanks,
Nick
___
On Wed, Sep 3, 2008 at 1:31 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> On 2008-09-03, at 13:15, Zach Dennis wrote:
>>
>> On Wed, Sep 3, 2008 at 12:40 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
>>>
>>> You can submit a form using Javascript.
>>
>> That's why we don't have submit buttons. =)
>>
>
On Wed, Sep 3, 2008 at 1:57 PM, Nick Hoffman <[EMAIL PROTECTED]> wrote:
> I'm writing specs for a module for my Rails app. The module will live in
> lib/ . For now, I've created the directory spec/lib/ to store the specs for
> files in lib/ . However, I'm curious to know if there's a currently acce
Thank you very much for all your help, this made everything crystal clear!
--
View this message in context:
http://www.nabble.com/Setting-instance-variables-for-controllers-tp19283500p19295990.html
Sent from the rspec-users mailing list archive at Nabble.com.
__
On 3.9.2008, at 19.38, Zach Dennis wrote:
On Wed, Sep 3, 2008 at 1:31 PM, Nick Hoffman <[EMAIL PROTECTED]>
wrote:
On 2008-09-03, at 13:15, Zach Dennis wrote:
On Wed, Sep 3, 2008 at 12:40 PM, Nick Hoffman
<[EMAIL PROTECTED]> wrote:
You can submit a form using Javascript.
That's why we
Jarkko Laine wrote:
>
> On 3.9.2008, at 19.38, Zach Dennis wrote:
>
>> On Wed, Sep 3, 2008 at 1:31 PM, Nick Hoffman <[EMAIL PROTECTED]>
>> wrote:
>>> On 2008-09-03, at 13:15, Zach Dennis wrote:
On Wed, Sep 3, 2008 at 12:40 PM, Nick Hoffman <[EMAIL PROTECTED]>
wrote:
>
> You c
On Wed, Sep 3, 2008 at 6:21 PM, Ben Mabey <[EMAIL PROTECTED]> wrote:
> Jarkko Laine wrote:
>>
>> On 3.9.2008, at 19.38, Zach Dennis wrote:
>>
>>> On Wed, Sep 3, 2008 at 1:31 PM, Nick Hoffman <[EMAIL PROTECTED]>
>>> wrote:
On 2008-09-03, at 13:15, Zach Dennis wrote:
>
> On Wed, Sep 3, 2
24 matches
Mail list logo