Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for ror 301 #243

Closed
wants to merge 1 commit into from

1 participant

@baldowl

Seems to me that the latest release of RoR still needs _assigns to have working view specs.

@baldowl

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

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Oct 15, 2010
  1. @baldowl
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/rspec/rails/view_assigns.rb
View
4 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
Something went wrong with that request. Please try again.