Wayne Conrad
unread,Aug 27, 2010, 1:03:05 PM8/27/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Remarkable
Hello. Remarkable newbie, writing tests for some very old, very
crusty rails code. I'm stumped by a strange exception, "No action was
performed or declared," when using the should_assign_to matcher.
(Part of) the controller:
class IndexController < ApplicationController
def initialize
...
@title = 'Welcome'
...
end
...
end
(Part of) the spec:
describe IndexController do
it 'should have a welcoming title' do
should assign_to(:title, :with=>'Welcome')
end
...
end
The backtrace when I run it:
ScriptError in 'IndexController should have a welcoming title'
No action was performed or declared.
/var/lib/gems/1.8/gems/remarkable_rails-3.1.13/lib/remarkable_rails/
action_controller/macro_stubs.rb:553:in `run_action!'
/var/lib/gems/1.8/gems/remarkable_rails-3.1.13/lib/remarkable_rails/
action_controller/base.rb:16:in `send'
/var/lib/gems/1.8/gems/remarkable_rails-3.1.13/lib/remarkable_rails/
action_controller/base.rb:16:in `perform_action_with_macro_stubs'
/var/lib/gems/1.8/gems/remarkable-3.1.13/lib/remarkable/dsl/
callbacks.rb:65:in `send'
/var/lib/gems/1.8/gems/remarkable-3.1.13/lib/remarkable/dsl/
callbacks.rb:65:in `run_before_assert_callbacks'
/var/lib/gems/1.8/gems/remarkable-3.1.13/lib/remarkable/dsl/
callbacks.rb:61:in `each'
/var/lib/gems/1.8/gems/remarkable-3.1.13/lib/remarkable/dsl/
callbacks.rb:61:in `run_before_assert_callbacks'
/var/lib/gems/1.8/gems/remarkable-3.1.13/lib/remarkable/dsl/
assertions.rb:283:in `matches?'
/home/devel/production/main/portal/spec/controllers/
index_controller_spec.rb:14:
Versions:
ruby 1.8.7 (2010-01-10 patchlevel 249) [i486-linux]
rspec (1.3.0)
rspec-rails (1.3.2)
remarkable (3.1.13)
remarkable_activerecord (3.1.13)
remarkable_rails (3.1.13)
rails (2.2.3)
Being new to this, I'm sure I'm goofing something up. Do you know
what I'm doing wrong? Thanks.