Displaying 6 results from an estimated 6 matches for "lastobelus".
2006 Nov 30
3
model stubs with view/controller specs: error_messages_for??
How would I set up a model stub so that <%= error_messages_for
''some_model'' %> doesn''t complain?
I started going down this road: @some_model.stub!
(:errors).and_return(ActiveRecord::Errors.new)
but it seems like a long, hopefully uneccessary road.
Cheers,
Michael
2006 Dec 21
7
rspec_autotest no longer re-runs tests with rspec 0.7.5
Has anyone else encountered this problem?
What I mean is, rspec_autotest runs all specs, then waits. When you
change a spec, it reruns that spec. However, if that spec now passes,
it should run the whole suite again, so you can see the next one to
work on. It no longer does this. This renders it somewhat useless.
Does anyone have autotest working with rspec 0.7.5, or does anyone
have any
2006 Nov 30
4
response is null when using should_render_rjs
I''m trying to use rspec to test a controller that has ajax.
I have the following action:
def change_ad_type_form
render :update do |page|
page.replace_html ''ad_sub_form'', :partial => ''text''
end
end
and the following spec:
specify "should return Text subform on AJAX request to
change_ad_type_form" do
2006 Dec 21
1
heres how to get color output in rspec_autotest with rspec 0.7.5
In case anyone else is trying to make this work, here is what I did
(Before 0.7.4 I had patched the regex in zentest redgreen, but that
is not used any more)
To use directly, it is very simple. In rspec_autotest/lib/
rspec_autotest.rb, add a -c to the spec_command in the initializer
function:
@spec_command = "spec -c --diff unified"
This won''t help however if you want
2006 Feb 10
12
Accessing ''many'' variables
Hi,
I have a class called Outlet which has_many Jacks. Apart from internal
id, each jack is unique by the attribute ''color''.
I''d like to iterate through each Outlet, and be able to output data
for a Jack of a certain color.
Say, I want to access the orange jack for the current outlet:
<td><%=h outlet.jack.color[''O''].ip_address
2007 Apr 01
8
No stacktrace on errors (edge rails)
Hi,
I must be missing something or have something misconfigured, but I
get no stack-trace when there is an error in the code behind a view.
If the view doesn''t compile, then I see an error & stacktrace, but
all other errors I get a "lost network connection" from the browser,
and nothing at all in the server output or development.log.
It''s been that way with