I would like to remove some unused helpers from the app/helpers dir, but
when I do so my specs fail.
Why is this? I don’t see where those helpers are referenced within the
tests. Is there a way to delete these unused files?
Thanks
I would like to remove some unused helpers from the app/helpers dir, but
when I do so my specs fail.
Why is this? I don’t see where those helpers are referenced within the
tests. Is there a way to delete these unused files?
Thanks
A stacktrace would help
A stacktrace would help
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S
script/spec -O spec/spec.opts spec/views/addresses/show.rhtml_spec.rb
spec/helpers/addresses_helper_spec.rb
spec/views/addresses/index.rhtml_spec.rb
spec/views/addresses/edit.rhtml_spec.rb
spec/views/addresses/new.rhtml_spec.rb
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:249:in
load_missing_constant': Expected /Users/chris/Documents/Projects/Rails/MyProject/trunk/config/../app/helpers/addresses_helper.rb to define AddressesHelper (LoadError) from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:452:in
const_missing’
from
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/gems/1.8/gems/activesupport-1.4.2/lib/active_support/dependencies.rb:464:in
const_missing' from ./spec/views/addresses/show.rhtml_spec.rb:4 from /Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:54:in
class_eval’
from
/Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:54:in
eval_behaviour' from /Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/dsl/behaviour.rb:31:in
initialize’
from
/Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/dsl/behaviour_factory.rb:36:in
new' from /Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/dsl/behaviour_factory.rb:36:in
create’
… 21 levels…
from
/Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:155:in
parse' from /Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/runner/option_parser.rb:88:in
create_behaviour_runner’
from
/Users/chris/Documents/Projects/Rails/MyProject/trunk/vendor/plugins/rspec/lib/spec/runner/command_line.rb:14:in
`run’
from script/spec:4
Hans de Graaff wrote:
Looks like you still have a (possibly generated?) spec for this helper.
Kind regards,
Hans
I do, but the issue is that it requires the
app/helpers/addresses_helper.rb file, which is that one that I am trying
to delete.
`load_missing_constant’: Expected
/Users/chris/Documents/Projects/Rails/MyProject/trunk/config/…/app/helpers/addresses_helper.rb
to define AddressesHelper (LoadError)
I seem to remember being able to delete helpers. I would think that
these auto references that exist would check if the file exists before
trying to include them. Is this not possible?
Thanks for the help.
On Fri, 2007-11-02 at 00:39 +0100, Chris O. wrote:
A stacktrace would help
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby -S
script/spec -O spec/spec.opts spec/views/addresses/show.rhtml_spec.rb
spec/helpers/addresses_helper_spec.rb
Looks like you still have a (possibly generated?) spec for this helper.
Kind regards,
Hans
On Fri, 2007-11-02 at 15:58 +0100, Chris O. wrote:
Hans de Graaff wrote:
Looks like you still have a (possibly generated?) spec for this helper.
Kind regards,
Hans
I do, but the issue is that it requires the
app/helpers/addresses_helper.rb file, which is that one that I am trying
to delete.
If there is still a spec file that references the helper then it can’t
be removed without causing spec failures. You should also remove the
spec for the helper for the specs to run without problems. If that
sounds obvious then you might be trying to do something more complicated
in which case some more explanation of what you are trying to achieve
would be helpful.
Kind regards,
Hans
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs