On Tue, Apr 14, 2009 at 8:24 AM, Salil Gaikwad <li...@ruby-forum.com> wrote:

> following is the method of the helper
>
> module ApplicationHelper
>  def tab_class(tab)
>    'class="active"' if tab == params[:controller]
>  end
> end
>
> i write the spec method as follows
>
> describe ApplicationHelper do
>   it "should be active if controller is same" do
>    tab_class('royalty_statement').should include('active')
>   end
> end
>
> it gives me following error
>
> undefined local variable or method `params' for
> #<Spec::Rails::Example::RailsExa
> mpleGroup::Subclass_1:0x5234150>
>

We need the full trace to analyse this

Aslak


>
> Regards
>
> Salil
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> rspec-users mailing list
> rspec-users@rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to