Can someone please explain to me why this spec fails
it "should work" do
template.stub!(:render)
template.should_receive(:render).with(:partial => "foo")
render @template_with_render_partial_foo
end
but this spec passes
it "should work" do
@foo.stub!(:bar)
@foo.should_receive(:ba
s fine in my app and generates the following, desired HTML:
http://domain.com:3000/funds/18/edit";>.
Many thanks in advance.
RSL
--
Posted via http://www.ruby-forum.com/.
___
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users
Thanks, David but unfortunately for me this is happening on 2.0.2 Rails,
with rspec/rspec-rails, from about a month and a half ago. Must be
something else. Here's hoping someone else has run across this. :/
--
Posted via http://www.ruby-forum.com/.
___
2:in
`run'
vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:22:in
`run'
vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:21:in
`each'
vendor/plugins/rspec/lib/spec/runner/example_group_runner.rb:21:in
`run'
vendor/plugins/rspec/li
und, :host => PRIVATE_HOST)
end
end
[which is what the form_for should have been doing internally anyhow]
and specing it in isolation. It passes in the helper specs so I just
stub out the helper call in the view specs and all is well. Thanks again
for your help, David.
RSL
--
Post
Having some weird failures of rescue_from in all my specs. They still
rescue in actual usage, just not in my specs. Made a pastie of the code:
http://pastie.org/257399 This is with latest [as of 1:00 PM Eastern time
zone] rspec/rspec-rails/edge. Thanks in advance for any replies on this.
RSL
Apparently this is documented behavior and can be fixed with
@controller.use_rails_error_handling! though I'm not sure why they're
suddenly failing now [since use_rails_error_handling! has been in
rspec-rails since June of last year, heh] but I'm not looking this gift
horse in