Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

- Closes #243.
  • Loading branch information...
commit dd0095af9088a00f1a4d1717c137bc79e365a6ab 1 parent 1b82c1f
Emanuele Vicentini baldowl authored dchelimsky committed
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rspec/rails/view_assigns.rb
4 lib/rspec/rails/view_assigns.rb
View
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.