Displaying 2 results from an estimated 2 matches for "calculate_quote".
2007 Jun 27
2
Controller specs not shareable?
Hi
I just wondered if there was a reason why Rails controller specs are
not shareable? eg
describe "All XHR POSTs to /gap/calculate_quote", :shared => true do
controller_name :gap
# ...
end
describe "XHR POST /gap/calculate_quote with valid details" do
it_should_behave_like "All XHR POSTs to /gap/calculate_quote"
# ...
end
blows up with the following error:
##########
/Users/ashleymora...
2007 Mar 21
4
How to spec error_messages_for
Hi
I''m trying to spec a call to error_messages_for to avoid stubbing out
whole models. Something like this:
context "A rendered calculate_quote view" do
setup do
@form = mock("form")
assigns[:form] = @form
end
specify "should render the error messages" do
<SOMETHING>.should_receive(:error_messages_for).with
(''form'', :anything)
render ''gap/calculate_quo...