From cf5c12f39f0732a263d29bc774692e664d9b4ee3 Mon Sep 17 00:00:00 2001 From: Eric Allen Date: Mon, 28 Feb 2011 23:56:18 -0800 Subject: [PATCH] Fix creepy RSpec-induced bug --- lib/tracks/source_view.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/tracks/source_view.rb b/lib/tracks/source_view.rb index 9505282b..8cb17ca8 100644 --- a/lib/tracks/source_view.rb +++ b/lib/tracks/source_view.rb @@ -12,6 +12,10 @@ module Tracks def nil? yield if @source_view.nil? && block_given? end + + def context + yield if :context == @source_view && block_given? + end def method_missing(check_source_view,*args) yield if check_source_view == @source_view && block_given? @@ -61,4 +65,4 @@ module Tracks end -ActionController::Base.send(:include, Tracks::SourceViewSwitching::Controller) \ No newline at end of file +ActionController::Base.send(:include, Tracks::SourceViewSwitching::Controller)