Sha256: e8d87e21b8276416ea98132b72861fa1d35044bd4c61adaa4979556720a237f8
Contents?: true
Size: 671 Bytes
Versions: 2
Compression:
Stored size: 671 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.10.0 | spec/draper/view_context_spec.rb |
draper-0.9.5 | spec/draper/view_context_spec.rb |