Permalink
Browse files

Fix assign_to_matcher for ruby 1.9.2: check for instance variables us…

…ing symbols instead of strings
  • Loading branch information...
1 parent 240342b commit 76a8aa726ecc5abdff86f4654ea0b3c438f43b6f @kollektiv kollektiv committed with jferris Feb 2, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/shoulda/matchers/action_controller/assign_to_matcher.rb
@@ -60,7 +60,7 @@ def in_context(context)
private
def assigned_value?
- if !@controller.instance_variables.include?("@#{@variable}")
+ if !@controller.instance_variables.map(&:to_s).include?("@#{@variable}")
@failure_message =
"Expected action to assign a value for @#{@variable}"
false

0 comments on commit 76a8aa7

Please sign in to comment.