Sha256: e681a89a12802683b91b36c182abb6a133c1eecc23982135f8c3114cf83dda26
Contents?: true
Size: 663 Bytes
Versions: 2
Compression:
Stored size: 663 Bytes
Contents
require 'spec_helper' 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 Draper::ViewContext.current = 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.11.1 | spec/draper/view_context_spec.rb |
draper-0.11.0 | spec/draper/view_context_spec.rb |