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