Permalink
Browse files

Tweaked assign() to work with Ruby on Rails 3.0.1.

- Closes #243.
  • Loading branch information...
1 parent 1b82c1f commit dd0095af9088a00f1a4d1717c137bc79e365a6ab @baldowl baldowl committed with dchelimsky Oct 15, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rspec/rails/view_assigns.rb
@@ -13,14 +13,14 @@ def assign(key, value)
_encapsulated_assigns[key] = value
end
- if ::Rails::VERSION::STRING == "3.0.0"
+ if ::Rails::VERSION::STRING =~ /3\.0\.[01]/
def _assigns
super.merge(_encapsulated_assigns)
end
def view_assigns
_assigns
end
- else # >= 3.0.1
+ else # >= 3.0.2 maybe...
def view_assigns
super.merge(_encapsulated_assigns)
end

0 comments on commit dd0095a

Please sign in to comment.