Sha256: c9716a229e1026e018bd55dd7c68bb982d8959101454b02c82bbbe56c7014e47
Contents?: true
Size: 697 Bytes
Versions: 2
Compression:
Stored size: 697 Bytes
Contents
require 'spec_helper' require 'draper' describe Draper::ViewContext do let (:app_controller) do ApplicationController end let (:app_controller_instance) do app_controller.new end it "implements #set_current_view_context" do app_controller_instance.should respond_to(:set_current_view_context) end it "calls #before_filter with #set_current_view_context" do app_controller.before_filters.should include(:set_current_view_context) end it "raises an exception if the view_context is fetched without being set" do Thread.current[:current_view_context] = nil expect {app_controller.current_view_context}.should raise_exception(Exception) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
draper-0.8.1 | spec/view_context_spec.rb |
draper-0.8.0 | spec/view_context_spec.rb |