On Wed, Mar 12, 2008 at 3:19 AM, David Schmidt <[EMAIL PROTECTED]> wrote:
> I'm currently working on some RSpec view tests and I'm having problems
> with expect_render. Most of the expect_render's work fine, but in one
> of my views I have:
>
> <%= render :partial => "user_cloud", :locals => {:
I'm having the exact problem described in this earlier post:
http://www.nabble.com/Odd-response.body-behavior-to12837556.html#a12837556
That is, after a post, response.body is just the controller/view string
("user/login" in my case).
Failing to find any answer on the web, I'm trying to trace ex
Are you assigning @featured_user (ie: assigns[:featured_user]) before
you render your template? We use :locals w/o any problem, for example:
template.expect_render(:partial => 'profiles/data', :locals =>
{:profile => @profile}).and_return(%||)
Zach
On Tue, Mar 11, 2008 at 11:19 PM, David Schmid
This is perhaps a naive question, but what is the recommended manner of
testing a helper method in rspec? I have created a simple string manipulation
function and I want to write some tests for it. It it were a script then I
would just add if __FILE__ == $0 and add the tests below that but I do n
On Wed, Mar 12, 2008 at 3:54 PM, James B. Byrne <[EMAIL PROTECTED]> wrote:
> This is perhaps a naive question, but what is the recommended manner of
> testing a helper method in rspec?
You just describe the helper module and call the helper method like
you'd do in the views:
require File.dirname
This doesn't work for me on 1.1.3
I have something like this:
describe Support do
describe "attached image" do
it "should validate presence of attachment" do
# test stuff ...
end
it "should validate that attachment is an image" do
# test stuff ...
On Wed, Mar 12, 2008 at 5:22 PM, Jay Donnell <[EMAIL PROTECTED]> wrote:
> This doesn't work for me on 1.1.3
> I have something like this:
>
> describe Support do
> describe "attached image" do
> it "should validate presence of attachment" do
> # test stuff ...
> end
>
>
describe MyController do
integrate_views
describe "A common base senario" do
it "no longer integrates views" do
be_careful
end
end
end
integrate_views affects an attribute in the class formed by the describe
factory method. The second describe generates its own class, so
integ
Has anyone come up with a solution for stubbing partials and passing
form builders to it?
i have a complex form with many parts, and those are rendered in
partials
On Oct 21, 2007, at 8:46 AM, rupert wrote:
>> i'm having problem with a form_for situation where i'm trying to DRY
>> out the re
Does "Support attached image" or "support attached image" work?
JD
On Mar 12, 2008, at 10:41 AM, David Chelimsky wrote:
> On Wed, Mar 12, 2008 at 5:22 PM, Jay Donnell <[EMAIL PROTECTED]>
> wrote:
>> This doesn't work for me on 1.1.3
>> I have something like this:
>>
>> describe Support do
>>
On Wed, Mar 12, 2008 at 8:23 PM, nzook <[EMAIL PROTECTED]> wrote:
>
> describe MyController do
> integrate_views
> describe "A common base senario" do
> it "no longer integrates views" do
> be_careful
>end
> end
> end
>
> integrate_views affects an attribute in the class form
You can use mocha parameter matching to match on "anything" where your
form builder would be passed in. You could also use Mocha's "kind_of"
parameter matcher to ensure that what you expect is a FormBuilder
object.
Another way to do this is to not pass in your form builder, but the
object needed,
On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis <[EMAIL PROTECTED]> wrote:
> You can use mocha parameter matching to match on "anything" where your
> form builder would be passed in. You could also use Mocha's "kind_of"
> parameter matcher to ensure that what you expect is a FormBuilder
> object.
>
On Mar 12, 2008, at 5:47 PM, David Chelimsky wrote:
> On Wed, Mar 12, 2008 at 9:43 PM, Zach Dennis
> <[EMAIL PROTECTED]> wrote:
>> You can use mocha parameter matching to match on "anything" where
>> your
>> form builder would be passed in. You could also use Mocha's
>> "kind_of"
>> param
I have looked through the docs, looked at the code, even gave a
cursory (2 page) glance at google, and it is not clear to me what
SpecServer is or what it is for.
Is it meant to speed up the execution of specs in a rails environment
by doing some magic on the database?
Or I am thinking it keeps a
On Mar 13, 2008, at 12:17 AM, Mikel Lindsaar wrote:
> I have looked through the docs, looked at the code, even gave a
> cursory (2 page) glance at google, and it is not clear to me what
> SpecServer is or what it is for.
>
> Is it meant to speed up the execution of specs in a rails environment
>
16 matches
Mail list logo