I found this at: http://github.com/rspec/rspec-rails

describe EventsHelper do
  describe "#link_to_event" do
    it "displays the title, and formatted date" do
      event = Event.new("Ruby Kaigi", Date.new(2010, 8, 27))
      # helper is an instance of ActionView::Base configured with the
      # EventsHelper and all of Rails' built-in helpers
      helper.link_to_event.should =~ /Ruby Kaigi, 27 Aug, 2010/
    end
  end
end

So helper is an instance of ActionView::Base. Very useful... I think.
But how do I use it for my scenario I wonder?
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to