<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -1,6 +1,10 @@
 == Change Log
 
 === Edge
+
+* Update Cucumber and RSpec, clean up some features and fix specs. [Sean Cribbs]
+* Set the protected attributes for users in User.protected_attributes 
+[Jim Gay]
 * Don't allow a nil ETag in SiteController. [David Cato]
 * Prevent failed login message from sticking around. [Kunal Shah]
 * Fix failing test regarding extension order. [Brett McHargue]</diff>
      <filename>CHANGELOG</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ class Admin::PreferencesController &lt; ApplicationController
 
   def valid_params?
     hash = (params[:user] || {}).symbolize_keys
-    (hash.keys - [:password, :password_confirmation, :email]).size == 0
+    (hash.keys - User.protected_attributes).size == 0
   end
 
   def announce_bad_data</diff>
      <filename>app/controllers/admin/preferences_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -37,7 +37,7 @@ class Admin::WelcomeController &lt; ApplicationController
     end
     
     def announce_invalid_user
-      flash[:error].now = 'Invalid username or password.'
+      flash.now[:error] = 'Invalid username or password.'
     end
     
 end</diff>
      <filename>app/controllers/admin/welcome_controller.rb</filename>
    </modified>
    <modified>
      <diff>@@ -27,6 +27,15 @@ class User &lt; ActiveRecord::Base
   validates_numericality_of :id, :only_integer =&gt; true, :allow_nil =&gt; true, :message =&gt; 'must be a number'
     
   attr_writer :confirm_password
+  class &lt;&lt; self
+    def protected_attributes
+      @protected_attributes ||= [:password, :password_confirmation, :email]
+    end
+    
+    def protected_attributes=(array)
+      @protected_attributes = array.map{|att| att.to_sym }
+    end
+  end
   
   def sha1(phrase)
     Digest::SHA1.hexdigest(&quot;--#{salt}--#{phrase}--&quot;)</diff>
      <filename>app/models/user.rb</filename>
    </modified>
    <modified>
      <diff>@@ -7,10 +7,12 @@ development:
   adapter: sqlite3
   database: db/radiant_dev.db
   
-test:
+test: &amp;TEST
   adapter: sqlite3
   database: db/radiant_test.db
 
 production:
   adapter: sqlite3
-  database: db/radiant_live.db
\ No newline at end of file
+  database: db/radiant_live.db
+cucumber:
+  &lt;&lt;: *TEST
\ No newline at end of file</diff>
      <filename>config/database.sqlite.yml</filename>
    </modified>
    <modified>
      <diff>@@ -30,7 +30,7 @@ config.action_controller.allow_forgery_protection    = false
 # ActionMailer::Base.deliveries array.
 config.action_mailer.delivery_method = :test
 
-config.gem &quot;rspec&quot;, :version =&gt; &quot;1.2.4&quot;, :lib =&gt; false
-config.gem &quot;rspec-rails&quot;, :version =&gt; &quot;1.2.4&quot;, :lib =&gt; false
+config.gem &quot;rspec&quot;, :version =&gt; &quot;1.2.6&quot;, :lib =&gt; false
+config.gem &quot;rspec-rails&quot;, :version =&gt; &quot;1.2.6&quot;, :lib =&gt; false
 config.gem &quot;webrat&quot;, :version =&gt; &quot;~&gt;0.4.4&quot;, :lib =&gt; false
-config.gem &quot;cucumber&quot;, :version =&gt; &quot;~&gt;0.3.0&quot;, :lib =&gt; false
\ No newline at end of file
+config.gem &quot;cucumber&quot;, :version =&gt; &quot;~&gt;0.3.9&quot;, :lib =&gt; false
\ No newline at end of file</diff>
      <filename>config/environments/test.rb</filename>
    </modified>
    <modified>
      <diff>@@ -4,21 +4,21 @@ Feature: Proper content negotiation
   wants to access the admin section with multiple content formats
 
   Scenario: Default to HTML format
-    Given I am logged in as 'admin'
-    When I send an 'Accept' header of 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*'
-    And I go to '/admin/pages'
-    Then I should not see 'Missing template'
+    Given I am logged in as &quot;admin&quot;
+    When I send an &quot;Accept&quot; header of &quot;image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*&quot;
+    And I go to &quot;/admin/pages&quot;
+    Then I should not see &quot;Missing template&quot;
     
   Scenario: Requesting XML format via file-extension
-    Given I am logged in as 'admin'
-    When I send an 'Accept' header of 'image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*'
-    And I go to '/admin/pages.xml'
-    Then I should see '&lt;\?xml'
+    Given I am logged in as &quot;admin&quot;
+    When I send an &quot;Accept&quot; header of &quot;image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-ms-application, application/vnd.ms-xpsdocument, application/xaml+xml, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*&quot;
+    And I go to &quot;/admin/pages.xml&quot;
+    Then I should see &quot;&lt;\?xml&quot;
 
   Scenario: Requesting children via Ajax
-    Given I am logged in as 'admin'
-    When I send an 'Accept' header of 'text/javascript, text/html, application/xml, text/xml, */*'
-    And I send an 'X-Requested-With' header of 'XMLHttpRequest'
-    And I request the children of page 'home'
-    Then I should not see 'Radiant CMS'
-    And I should see '&lt;tr'
\ No newline at end of file
+    Given I am logged in as &quot;admin&quot;
+    When I send an &quot;Accept&quot; header of &quot;text/javascript, text/html, application/xml, text/xml, */*&quot;
+    And I send an &quot;X-Requested-With&quot; header of &quot;XMLHttpRequest&quot;
+    And I request the children of page &quot;home&quot;
+    Then I should not see &quot;Radiant CMS&quot;
+    And I should see &quot;&lt;tr&quot;
\ No newline at end of file</diff>
      <filename>features/admin/content_negotiation.feature</filename>
    </modified>
    <modified>
      <diff>@@ -3,8 +3,8 @@ Feature: Managing snippets
   As a developer I want to manage the layouts
   
   Background:
-    Given I am logged in as 'developer'
+    Given I am logged in as &quot;developer&quot;
     
   Scenario: View a layout
     When I view a layout
-    Then I should see 'Edit Layout'
\ No newline at end of file
+    Then I should see &quot;Edit Layout&quot;
\ No newline at end of file</diff>
      <filename>features/admin/layouts_management.feature</filename>
    </modified>
    <modified>
      <diff>@@ -4,68 +4,68 @@ Feature: Managing pages
   wants to manipulate pages in the admin interface
 
   Background:
-    Given I am logged in as 'existing'
+    Given I am logged in as &quot;existing&quot;
   
   Scenario: Listing pages
-    When I go to '/admin/pages'
-    Then I should see 'Pages'
-    And I should see 'Home'
+    When I go to &quot;/admin/pages&quot;
+    Then I should see &quot;Pages&quot;
+    And I should see &quot;Home&quot;
     
   Scenario: No pages
     Given there are no pages
-    When I go to '/admin/pages'
-    Then I should see 'No Pages'
+    When I go to &quot;/admin/pages&quot;
+    Then I should see &quot;No Pages&quot;
     
   Scenario: Creating a homepage
     Given there are no pages
-    When I go to '/admin/pages'
-    And I follow 'New Homepage'
-    Then I should see 'New Page'
-    And there should be a 'body' part
-    And there should be an 'extended' part
-    When I fill in 'Page Title' with 'My site'
-    And I fill in 'Slug' with '/'
-    And I fill in 'Breadcrumb' with 'My site'
-    And I fill in the 'body' content with 'Under Construction'
-    And I fill in the 'extended' content with 'foobar'
-    And I select 'Published' from 'Status'
-    And I press 'Create page'
-    Then I should see 'Your page has been saved'
-    When I go to '/'
-    Then I should see 'Under Construction'
+    When I go to &quot;/admin/pages&quot;
+    And I follow &quot;New Homepage&quot;
+    Then I should see &quot;New Page&quot;
+    And there should be a &quot;body&quot; part
+    And there should be an &quot;extended&quot; part
+    When I fill in &quot;Page Title&quot; with &quot;My site&quot;
+    And I fill in &quot;Slug&quot; with &quot;/&quot;
+    And I fill in &quot;Breadcrumb&quot; with &quot;My site&quot;
+    And I fill in the &quot;body&quot; content with &quot;Under Construction&quot;
+    And I fill in the &quot;extended&quot; content with &quot;foobar&quot;
+    And I select &quot;Published&quot; from &quot;Status&quot;
+    And I press &quot;Create page&quot;
+    Then I should see &quot;Your page has been saved&quot;
+    When I go to &quot;/&quot;
+    Then I should see &quot;Under Construction&quot;
   
   Scenario: Creating child pages
-    When I go to '/admin/pages'
-    And I follow 'Add child'
-    Then I should see 'New Page'
-    And there should be a 'body' part
-    And there should be an 'extended' part
-    When I fill in 'Page Title' with 'My child'
-    And I fill in 'Slug' with 'my-child'
-    And I fill in 'Breadcrumb' with 'My child'
-    And I fill in the 'body' content with 'Under Construction'
-    And I fill in the 'extended' content with 'foobar'
-    And I select 'Published' from 'Status'
-    And I press 'Save and Continue Editing'
-    Then I should see 'Your page has been saved'
-    And I should see 'Under Construction'
-    When I go to '/my-child'
-    Then I should see 'Under Construction'
+    When I go to &quot;/admin/pages&quot;
+    And I follow &quot;Add child&quot;
+    Then I should see &quot;New Page&quot;
+    And there should be a &quot;body&quot; part
+    And there should be an &quot;extended&quot; part
+    When I fill in &quot;Page Title&quot; with &quot;My child&quot;
+    And I fill in &quot;Slug&quot; with &quot;my-child&quot;
+    And I fill in &quot;Breadcrumb&quot; with &quot;My child&quot;
+    And I fill in the &quot;body&quot; content with &quot;Under Construction&quot;
+    And I fill in the &quot;extended&quot; content with &quot;foobar&quot;
+    And I select &quot;Published&quot; from &quot;Status&quot;
+    And I press &quot;Save and Continue Editing&quot;
+    Then I should see &quot;Your page has been saved&quot;
+    And I should see &quot;Under Construction&quot;
+    When I go to &quot;/my-child&quot;
+    Then I should see &quot;Under Construction&quot;
     
   Scenario: Delete page
-    When I go to '/admin/pages'
-    And I follow 'remove page'
-    Then I should see 'permanently remove'
-    When I press 'Delete Pages'
-    Then I should see 'successfully removed'
+    When I go to &quot;/admin/pages&quot;
+    And I follow &quot;remove page&quot;
+    Then I should see &quot;permanently remove&quot;
+    When I press &quot;Delete Pages&quot;
+    Then I should see &quot;successfully removed&quot;
     
   Scenario: View a page
     When I view a page
-    Then I should see 'Edit Page'
+    Then I should see &quot;Edit Page&quot;
     
   Scenario: Change page type
-    When I edit the 'virtual' page
-    And I select '&amp;lt;normal&amp;gt;' from 'Page type'
-    And I press 'Save and Continue Editing'
-    Then I should see 'Your page has been saved'
-    And '&amp;lt;normal&amp;gt;' should be selected for 'Page type'
\ No newline at end of file
+    When I edit the &quot;virtual&quot; page
+    And I select &quot;&amp;lt;normal&amp;gt;&quot; from &quot;Page type&quot;
+    And I press &quot;Save and Continue Editing&quot;
+    Then I should see &quot;Your page has been saved&quot;
+    And &quot;&amp;lt;normal&amp;gt;&quot; should be selected for &quot;Page type&quot;
\ No newline at end of file</diff>
      <filename>features/admin/pages_management.feature</filename>
    </modified>
    <modified>
      <diff>@@ -4,18 +4,18 @@ Feature: Managing snippets
   content, as a content editor I want to manage a collection of snippets
   
   Background:
-    Given I am logged in as 'existing'
+    Given I am logged in as &quot;existing&quot;
   
   Scenario: List snippets
-    When I follow 'Snippets'
-    Then I should see 'first'
-    And I should see 'another'
-    And I should see 'markdown'
+    When I follow &quot;Snippets&quot;
+    Then I should see &quot;first&quot;
+    And I should see &quot;another&quot;
+    And I should see &quot;markdown&quot;
     # And a host of others
   
   Scenario: Create a snippet
-    When I follow 'Snippets'
-    And I follow 'New Snippet'
+    When I follow &quot;Snippets&quot;
+    And I follow &quot;New Snippet&quot;
     And I fill in &quot;Name&quot; with &quot;Mine&quot;
     And I fill in &quot;Body&quot; with &quot;My snippet&quot;
     And I press &quot;Create Snippet&quot;
@@ -23,16 +23,16 @@ Feature: Managing snippets
     And I should see &quot;Mine&quot;
     
   Scenario: Display form errors
-    When I follow 'Snippets'
-    And I follow 'New Snippet'
+    When I follow &quot;Snippets&quot;
+    And I follow &quot;New Snippet&quot;
     And I fill in &quot;Body&quot; with &quot;My snippet&quot;
     And I press &quot;Create Snippet&quot;
     Then I should see an error message
     And I should see the form
   
   Scenario: Continue editing
-    When I follow 'Snippets'
-    And I follow 'New Snippet'
+    When I follow &quot;Snippets&quot;
+    And I follow &quot;New Snippet&quot;
     And I fill in &quot;Name&quot; with &quot;Mine&quot;
     And I fill in &quot;Body&quot; with &quot;My snippet&quot;
     And I press &quot;Save and Continue Editing&quot;
@@ -41,14 +41,14 @@ Feature: Managing snippets
     
   Scenario: View a snippet
     When I view a snippet
-    Then I should see 'Edit Snippet'
+    Then I should see &quot;Edit Snippet&quot;
     
   Scenario: Delete a snippet with confirmation
-    When I follow 'Snippets'
-    And I follow 'Remove'
-    Then I should see 'permanently remove'
-    And I should see 'another'
-    When I press 'Delete Snippet'
-    Then I should see 'has been deleted'
-    And I should see 'first'
+    When I follow &quot;Snippets&quot;
+    And I follow &quot;Remove&quot;
+    Then I should see &quot;permanently remove&quot;
+    And I should see &quot;another&quot;
+    When I press &quot;Delete Snippet&quot;
+    Then I should see &quot;has been deleted&quot;
+    And I should see &quot;first&quot;
     
\ No newline at end of file</diff>
      <filename>features/admin/snippets_management.feature</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ Feature: User authentication and permissions
   users should be given different access permissions
   
   Scenario Outline: Authentication-login
-    When I go to '/admin/login'
+    When I go to &quot;/admin/login&quot;
     And I fill in &quot;Username&quot; with &quot;&lt;username&gt;&quot;
     And I fill in &quot;Password&quot; with &quot;password&quot;
     And I press &quot;Login&quot;
@@ -17,9 +17,9 @@ Feature: User authentication and permissions
       | developer |
   
   Scenario Outline: Authentication-logout
-    Given I am logged in as '&lt;username&gt;'
-    When I follow 'Log out'
-    Then I should see 'You are now logged out.'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    When I follow &quot;Log out&quot;
+    Then I should see &quot;You are now logged out.&quot;
     
     Examples:
       | username  |
@@ -29,9 +29,9 @@ Feature: User authentication and permissions
   
   
   Scenario Outline: All users can edit pages
-    Given I am logged in as '&lt;username&gt;'
-    And I should see 'Pages'
-    When I go to '/admin/pages'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should see &quot;Pages&quot;
+    When I go to &quot;/admin/pages&quot;
     And I follow &quot;Home&quot;
     Then I should see &quot;Edit Page&quot;
     And I should see &quot;Pages&quot;
@@ -43,12 +43,12 @@ Feature: User authentication and permissions
       | developer |
       
   Scenario Outline: All users can see and edit snippets
-    Given I am logged in as '&lt;username&gt;'
-    And I should see 'Snippets'
-    When I go to '/admin/snippets'
-    And I should not see 'You must have developer privileges'
-    And I follow 'first'
-    Then I should see 'Edit Snippet'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should see &quot;Snippets&quot;
+    When I go to &quot;/admin/snippets&quot;
+    And I should not see &quot;You must have developer privileges&quot;
+    And I follow &quot;first&quot;
+    Then I should see &quot;Edit Snippet&quot;
     
     Examples:
       | username  |
@@ -57,12 +57,12 @@ Feature: User authentication and permissions
       | developer |
   
   Scenario Outline: Admins and developers can see and edit layouts
-    Given I am logged in as '&lt;username&gt;'
-    And I should see 'Layouts'
-    When I go to '/admin/layouts'
-    And I should not see 'You must have developer privileges'
-    And I follow 'Main'
-    Then I should see 'Edit Layout'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should see &quot;Layouts&quot;
+    When I go to &quot;/admin/layouts&quot;
+    And I should not see &quot;You must have developer privileges&quot;
+    And I follow &quot;Main&quot;
+    Then I should see &quot;Edit Layout&quot;
     
     Examples:
       | username  |
@@ -70,10 +70,10 @@ Feature: User authentication and permissions
       | developer |
       
   Scenario Outline: Ordinary users cannot edit layouts
-    Given I am logged in as '&lt;username&gt;'
-    And I should not see 'Layouts'
-    When I go to '/admin/layouts'
-    Then I should see 'You must have developer privileges'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should not see &quot;Layouts&quot;
+    When I go to &quot;/admin/layouts&quot;
+    Then I should see &quot;You must have developer privileges&quot;
 
     Examples:
       | username  |
@@ -81,23 +81,23 @@ Feature: User authentication and permissions
       | another   |
     
   Scenario: Admins can see and edit users
-    Given I am logged in as 'admin'
-    And I should see 'Users'
-    When I go to '/admin/users'
-    And I should not see 'You must have administrative privileges'
-    And I follow 'Another'
-    Then I should see 'Edit User'
+    Given I am logged in as &quot;admin&quot;
+    And I should see &quot;Users&quot;
+    When I go to &quot;/admin/users&quot;
+    And I should not see &quot;You must have administrative privileges&quot;
+    And I follow &quot;Another&quot;
+    Then I should see &quot;Edit User&quot;
 
   Scenario: Admins do not see preferences link
-    Given I am logged in as 'admin'
-    And I should see 'Users'
-    And I should not see 'Preferences'
+    Given I am logged in as &quot;admin&quot;
+    And I should see &quot;Users&quot;
+    And I should not see &quot;Preferences&quot;
   
   Scenario Outline: Non-admins cannot see or edit users
-    Given I am logged in as '&lt;username&gt;'
-    And I should not see 'Users'
-    When I go to '/admin/users'
-    Then I should see 'You must have administrative privileges'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should not see &quot;Users&quot;
+    When I go to &quot;/admin/users&quot;
+    Then I should see &quot;You must have administrative privileges&quot;
 
     Examples:
       | username  |
@@ -106,10 +106,10 @@ Feature: User authentication and permissions
       | developer |
       
   Scenario Outline: Non-admins see preferences link
-    Given I am logged in as '&lt;username&gt;'
-    And I should see 'Preferences'
-    When I go to '/admin/preferences'
-    Then I should see 'User Preferences'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should see &quot;Preferences&quot;
+    When I go to &quot;/admin/preferences&quot;
+    Then I should see &quot;User Preferences&quot;
     
     Examples:
       | username  |
@@ -119,16 +119,16 @@ Feature: User authentication and permissions
 
 
   Scenario: Admin users can see extensions
-    Given I am logged in as 'admin'
-    And I should see 'Extensions'
-    When I go to '/admin/extensions'
-    Then I should see 'Archive'
+    Given I am logged in as &quot;admin&quot;
+    And I should see &quot;Extensions&quot;
+    When I go to &quot;/admin/extensions&quot;
+    Then I should see &quot;Archive&quot;
   
   Scenario Outline: Non-admin users cannot see extensions
-    Given I am logged in as '&lt;username&gt;'
-    And I should not see 'Extensions'
-    When I go to '/admin/extensions'
-    Then I should see 'You must have administrative privileges'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    And I should not see &quot;Extensions&quot;
+    When I go to &quot;/admin/extensions&quot;
+    Then I should see &quot;You must have administrative privileges&quot;
 
     Examples:
       | username  |
@@ -137,9 +137,9 @@ Feature: User authentication and permissions
       | developer |
   
   Scenario Outline: Anyone can export YAML
-    Given I am logged in as '&lt;username&gt;'
-    When I go to '/admin/export'
-    Then I should see 'id:'
+    Given I am logged in as &quot;&lt;username&gt;&quot;
+    When I go to &quot;/admin/export&quot;
+    Then I should see &quot;id:&quot;
     
     Examples:
       | username  |</diff>
      <filename>features/admin/user_permissions.feature</filename>
    </modified>
    <modified>
      <diff>@@ -4,7 +4,7 @@ Feature: Edit user preferences
   
   Scenario Outline: Edit preferences
     Given I am logged in as &quot;&lt;username&gt;&quot;
-    When I follow 'Preferences'
+    When I follow &quot;Preferences&quot;
     And I fill in &quot;E-mail&quot; with &quot;my-new-email@example.com&quot;
     And I press &quot;Save Changes&quot;
     Then I should see &quot;updated&quot;</diff>
      <filename>features/admin/user_preferences.feature</filename>
    </modified>
    <modified>
      <diff>@@ -3,20 +3,20 @@ Feature: Managing users
   As an administrator I want to manage the set of users
   
   Background:
-    Given I am logged in as 'admin'
-    And I go to '/admin/users'
+    Given I am logged in as &quot;admin&quot;
+    And I go to &quot;/admin/users&quot;
   Scenario: Listing users
-    Then I should see 'Admin'
-    And I should see 'Developer'
-    And I should see 'Existing'
+    Then I should see &quot;Admin&quot;
+    And I should see &quot;Developer&quot;
+    And I should see &quot;Existing&quot;
     # And a host of others
     
   Scenario: View a user
     When I view a user
-    Then I should see 'Edit User'
+    Then I should see &quot;Edit User&quot;
   
   Scenario: Create new user
-    When I follow 'New User'
+    When I follow &quot;New User&quot;
     And I fill in &quot;Name&quot; with &quot;New Guy&quot;
     And I fill in &quot;E-mail&quot; with &quot;newguy@example.com&quot;
     And I fill in &quot;Username&quot; with &quot;new_guy&quot;
@@ -27,7 +27,7 @@ Feature: Managing users
     And I should see &quot;New Guy&quot;
   
   Scenario: Display form errors on submit
-    When I follow 'New User'
+    When I follow &quot;New User&quot;
     And I fill in &quot;Name&quot; with &quot;New Guy&quot;
     And I fill in &quot;E-mail&quot; with &quot;newguy@example.com&quot;
     And I press &quot;Create User&quot;
@@ -35,7 +35,7 @@ Feature: Managing users
     And I should see the form
     
   Scenario: Edit existing user
-    When I follow 'Developer'
+    When I follow &quot;Developer&quot;
     Then I should see the form
     When I fill in &quot;Name&quot; with &quot;Old Guy&quot;
     And I fill in &quot;Username&quot; with &quot;oldguy&quot;
@@ -47,17 +47,17 @@ Feature: Managing users
   Scenario: Cannot remove self
     When I attempt to remove my own account
     Then I should see an error message
-    And I should see 'You cannot delete yourself'
+    And I should see &quot;You cannot delete yourself&quot;
 
   Scenario: Cannot forcefully delete self
     When I attempt to delete my own account
     Then I should see an error message
-    And I should see 'You cannot delete yourself'
+    And I should see &quot;You cannot delete yourself&quot;
   
   Scenario: Delete other users
-    When I follow 'Remove'
-    Then I should see 'permanently remove'
-    And I should see 'Another'
-    When I press 'Delete User'
-    Then I should see 'been deleted'
-    And I should not see 'Another'
\ No newline at end of file
+    When I follow &quot;Remove&quot;
+    Then I should see &quot;permanently remove&quot;
+    And I should see &quot;Another&quot;
+    When I press &quot;Delete User&quot;
+    Then I should see &quot;been deleted&quot;
+    And I should not see &quot;Another&quot;
\ No newline at end of file</diff>
      <filename>features/admin/users_management.feature</filename>
    </modified>
    <modified>
      <diff>@@ -7,36 +7,36 @@ Feature: Serving pages from front-end
     Given the page cache is clear
 
   Scenario: Basic page rendering
-    When I go to page '/first'
+    When I go to page &quot;/first&quot;
     Then I should get a 200 response code
-    And I should see 'First body.'
+    And I should see &quot;First body.&quot;
 
   Scenario: Rendering deeply nested page
-    When I go to page '/parent/child/grandchild/great-grandchild'
+    When I go to page &quot;/parent/child/grandchild/great-grandchild&quot;
     Then I should get a 200 response code
-    And I should see 'Great Grandchild body.'
+    And I should see &quot;Great Grandchild body.&quot;
   
   Scenario: Apache/lighttpd acceleration
     Given I have turned on X-Sendfile headers
-    When I go to page '/first'
-    And I go to page '/first'
+    When I go to page &quot;/first&quot;
+    And I go to page &quot;/first&quot;
     Then I should get an &quot;X-Sendfile&quot; header in the response
     
   Scenario: nginx acceleration
     Given I have turned on X-Accel-Redirect headers
-    When I go to page '/first'
-    And I go to page '/first'
+    When I go to page &quot;/first&quot;
+    And I go to page &quot;/first&quot;
     Then I should get an &quot;X-Accel-Redirect&quot; header in the response
     
   Scenario: page caching enabled
     Given I have page caching on
-    When I go to page '/first'
+    When I go to page &quot;/first&quot;
     Then I should get an &quot;ETag&quot; header in the response
     And The &quot;Cache-Control&quot; header should be &quot;public&quot;
 
   Scenario: page caching disabled
     Given I have page caching off
-    When I go to page '/first'
+    When I go to page &quot;/first&quot;
     Then I should not get an &quot;ETag&quot; header in the response
     And The &quot;Cache-Control&quot; header should be &quot;private&quot;
 </diff>
      <filename>features/page_serving.feature</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-Given(/^I am logged in as ['&quot;](\w+)['&quot;]$/) do |user|
+Given(/^I am logged in as &quot;([^\&quot;]*)&quot;$/) do |user|
   visit '/admin/login'
   user = users(user.intern)
   fill_in 'Username', :with =&gt; user.login
@@ -11,7 +11,7 @@ Given /^there are no pages$/ do
   PagePart.delete_all
 end
 
-Then /^['&quot;](.*)[&quot;'] should be selected for ['&quot;](.*)[&quot;']$/ do |value, field|
+Then /^&quot;([^\&quot;]*)&quot; should be selected for &quot;([^\&quot;]*)&quot;$/ do |value, field|
   select_box = field_labeled(field)
   response.should have_tag(&quot;select##{select_box.id}&quot;) do
     with_tag('option[selected]', :text =&gt; value)</diff>
      <filename>features/step_definitions/admin/admin_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,4 @@
-When /^I send an [&quot;'](.*)[&quot;'] header of ['&quot;](.*)['&quot;]$/ do |key, value|
+When /^I send an &quot;([^\&quot;]*)&quot; header of &quot;([^\&quot;]*)&quot;$/ do |key, value|
   @request_headers ||= {}
   @request_headers[key] = value
 end
@@ -24,7 +24,7 @@ When /^I view a user$/ do
   visit &quot;/admin/users/#{users(:admin).id}&quot;
 end
 
-When /^I request the children of page ['&quot;](\w+)['&quot;]$/ do |page|
+When /^I request the children of page &quot;([^\&quot;]*)&quot;$/ do |page|
   parent_page = pages(page.intern)
   set_headers
   visit &quot;/admin/pages/#{parent_page.id}/children&quot;, :get, {&quot;level&quot; =&gt; &quot;0&quot;}</diff>
      <filename>features/step_definitions/admin/content_negotiation_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,14 +1,14 @@
-When %r{^I fill in the ['&quot;](.*)['&quot;] content with ['&quot;](.*)['&quot;]$} do |part, content|
+When /^I fill in the &quot;([^\&quot;]*)&quot; content with &quot;([^\&quot;]*)&quot;$/ do |part, content|
   fill_in(&quot;part_#{part.to_slug}_content&quot;, :with =&gt; content)
 end
 
-Then /^there should be an? ['&quot;](.*)[&quot;'] part$/ do |name|
+Then /^there should be an? &quot;([^\&quot;]*)&quot; part$/ do |name|
   response.should have_tag(&quot;#page-#{name.to_slug}&quot;)
   response.should have_tag(&quot;#part-#{name.to_slug}&quot;)
   response.should have_tag(&quot;textarea#part_#{name.to_slug}_content&quot;)
 end
 
-When /^I edit the ['&quot;](.*)[&quot;'] page$/ do |name|
+When /^I edit the &quot;([^\&quot;]*)&quot; page$/ do |name|
   page = pages(name.to_sym)
   visit &quot;/admin/pages/#{page.id}/edit&quot;
 end
\ No newline at end of file</diff>
      <filename>features/step_definitions/admin/pages_management_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -8,7 +8,7 @@ Given /^the page cache is clear$/ do
   Radiant::Cache.clear if defined?(Radiant::Cache)
 end
 
-When(/^I go to page ['&quot;](.*)['&quot;]$/) do |url|
+When(/^I go to page &quot;(.*)&quot;$/) do |url|
   visit url
   @old_headers ||= response.headers.dup
 end</diff>
      <filename>features/step_definitions/page_serving_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,31 +1,35 @@
-require File.expand_path(File.join(File.dirname(__FILE__), '..', 'support', 'paths'))
+require File.expand_path(File.join(File.dirname(__FILE__), &quot;..&quot;, &quot;support&quot;, &quot;paths&quot;))
 
 # Commonly used webrat steps
 # http://github.com/brynary/webrat
 
+Given /^I am on (.+)$/ do |page_name|
+  visit path_to(page_name)
+end
+
 # When /^I go to (.+)$/ do |page_name|
 #   visit path_to(page_name)
 # end
 
-When /^I press [&quot;'](.*)[&quot;']$/ do |button|
+When /^I press &quot;([^\&quot;]*)&quot;$/ do |button|
   click_button(button)
 end
 
-When /^I follow [&quot;'](.*)[&quot;']$/ do |link|
+When /^I follow &quot;([^\&quot;]*)&quot;$/ do |link|
   click_link(link)
 end
 
-When /^I fill in [&quot;'](.*)[&quot;'] with [&quot;'](.*)[&quot;']$/ do |field, value|
+When /^I fill in &quot;([^\&quot;]*)&quot; with &quot;([^\&quot;]*)&quot;$/ do |field, value|
   fill_in(field, :with =&gt; value) 
 end
 
-When /^I select [&quot;'](.*)[&quot;'] from [&quot;'](.*)[&quot;']$/ do |value, field|
+When /^I select &quot;([^\&quot;]*)&quot; from &quot;([^\&quot;]*)&quot;$/ do |value, field|
   select(value, :from =&gt; field) 
 end
 
-# Use this step in conjunction with Rails' datetime_select helper. For example:
-# When I select 'December 25, 2008 10:00' as the date and time 
-When /^I select [&quot;'](.*)[&quot;'] as the date and time$/ do |time|
+# Use this step in conjunction with Rail's datetime_select helper. For example:
+# When I select &quot;December 25, 2008 10:00&quot; as the date and time 
+When /^I select &quot;([^\&quot;]*)&quot; as the date and time$/ do |time|
   select_datetime(time)
 end
 
@@ -36,64 +40,78 @@ end
 #   &lt;%= f.label :alternative %&gt;&lt;br /&gt;
 #   &lt;%= f.datetime_select :alternative %&gt;
 # The following steps would fill out the form:
-# When I select 'November 23, 2004 11:20' as the 'Preferred' data and time
-# And I select 'November 25, 2004 10:30' as the 'Alternative' data and time
-When /^I select [&quot;'](.*)[&quot;'] as the [&quot;'](.*)[&quot;'] date and time$/ do |datetime, datetime_label|
+# When I select &quot;November 23, 2004 11:20&quot; as the &quot;Preferred&quot; date and time
+# And I select &quot;November 25, 2004 10:30&quot; as the &quot;Alternative&quot; date and time
+When /^I select &quot;([^\&quot;]*)&quot; as the &quot;([^\&quot;]*)&quot; date and time$/ do |datetime, datetime_label|
   select_datetime(datetime, :from =&gt; datetime_label)
 end
 
-# Use this step in conjuction with Rail's time_select helper. For example:
-# When I select '2:20PM' as the time
-# Note: Rails' default time helper provides 24-hour time-- not 12 hour time. Webrat
+# Use this step in conjunction with Rail's time_select helper. For example:
+# When I select &quot;2:20PM&quot; as the time
+# Note: Rail's default time helper provides 24-hour time-- not 12 hour time. Webrat
 # will convert the 2:20PM to 14:20 and then select it. 
-When /^I select [&quot;'](.*)[&quot;'] as the time$/ do |time|
+When /^I select &quot;([^\&quot;]*)&quot; as the time$/ do |time|
   select_time(time)
 end
 
 # Use this step when using multiple time_select helpers on a page or you want to
 # specify the name of the time on the form.  For example:
-# When I select '7:30AM' as the 'Gym' time
-When /^I select [&quot;'](.*)[&quot;'] as the [&quot;'](.*)[&quot;'] time$/ do |time, time_label|
+# When I select &quot;7:30AM&quot; as the &quot;Gym&quot; time
+When /^I select &quot;([^\&quot;]*)&quot; as the &quot;([^\&quot;]*)&quot; time$/ do |time, time_label|
   select_time(time, :from =&gt; time_label)
 end
 
-# Use this step in conjuction with Rail's date_select helper.  For example:
-# When I select 'February 20, 1981' as the date
-When /^I select [&quot;'](.*)[&quot;'] as the date$/ do |date|
+# Use this step in conjunction with Rail's date_select helper.  For example:
+# When I select &quot;February 20, 1981&quot; as the date
+When /^I select &quot;([^\&quot;]*)&quot; as the date$/ do |date|
   select_date(date)
 end
 
 # Use this step when using multiple date_select helpers on one page or
 # you want to specify the name of the date on the form. For example:
-# When I select 'April 26, 1982' as the 'Date of Birth' date
-When /^I select [&quot;'](.*)[&quot;'] as the [&quot;'](.*)[&quot;'] date$/ do |date, date_label|
+# When I select &quot;April 26, 1982&quot; as the &quot;Date of Birth&quot; date
+When /^I select &quot;([^\&quot;]*)&quot; as the &quot;([^\&quot;]*)&quot; date$/ do |date, date_label|
   select_date(date, :from =&gt; date_label)
 end
 
-When /^I check [&quot;'](.*)[&quot;']$/ do |field|
+When /^I check &quot;([^\&quot;]*)&quot;$/ do |field|
   check(field) 
 end
 
-When /^I uncheck [&quot;'](.*)[&quot;']$/ do |field|
+When /^I uncheck &quot;([^\&quot;]*)&quot;$/ do |field|
   uncheck(field) 
 end
 
-When /^I choose [&quot;'](.*)[&quot;']$/ do |field|
+When /^I choose &quot;([^\&quot;]*)&quot;$/ do |field|
   choose(field)
 end
 
-When /^I attach the file at [&quot;'](.*)[&quot;'] to [&quot;'](.*)[&quot;'] $/ do |path, field|
+When /^I attach the file at &quot;([^\&quot;]*)&quot; to &quot;([^\&quot;]*)&quot;$/ do |path, field|
   attach_file(field, path)
 end
 
-Then /^I should see [&quot;'](.*)[&quot;']$/ do |text|
-  response.body.should =~ /#{text}/m
+Then /^I should see &quot;([^\&quot;]*)&quot;$/ do |text|
+  # response.should contain(text)
+  response.body.should match(Regexp.new(text))
+end
+
+Then /^I should not see &quot;([^\&quot;]*)&quot;$/ do |text|
+  # response.should_not contain(text)
+  response.body.should_not match(Regexp.new(text))
 end
 
-Then /^I should not see [&quot;'](.*)[&quot;']$/ do |text|
-  response.body.should_not =~ /#{text}/m
+Then /^the &quot;([^\&quot;]*)&quot; field should contain &quot;([^\&quot;]*)&quot;$/ do |field, value|
+  field_labeled(field).value.should =~ /#{value}/
 end
 
-Then /^the [&quot;'](.*)[&quot;'] checkbox should be checked$/ do |label|
+Then /^the &quot;([^\&quot;]*)&quot; field should not contain &quot;([^\&quot;]*)&quot;$/ do |field, value|
+  field_labeled(field).value.should_not =~ /#{value}/
+end
+    
+Then /^the &quot;([^\&quot;]*)&quot; checkbox should be checked$/ do |label|
   field_labeled(label).should be_checked
 end
+
+Then /^I should be on (.+)$/ do |page_name|
+  URI.parse(current_url).path.should == path_to(page_name)
+end</diff>
      <filename>features/step_definitions/webrat_steps.rb</filename>
    </modified>
    <modified>
      <diff>@@ -3,7 +3,7 @@ ENV[&quot;RAILS_ENV&quot;] = &quot;test&quot;
 require File.expand_path(Dir.pwd + '/config/environment')
 
 require 'cucumber/rails/world'
-require 'cucumber/formatters/unicode' # Comment out this line if you don't want Cucumber Unicode support
+require 'cucumber/formatter/unicode' # Comment out this line if you don't want Cucumber Unicode support
 require 'webrat'
 
 Webrat.configure do |config|</diff>
      <filename>features/support/env.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,12 +1,17 @@
-$:.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib')
+$LOAD_PATH.unshift(RAILS_ROOT + '/vendor/plugins/cucumber/lib') if File.directory?(RAILS_ROOT + '/vendor/plugins/cucumber/lib')
+
 begin
   require 'cucumber/rake/task'
+
   Cucumber::Rake::Task.new(:features) do |t|
-    t.cucumber_opts = &quot;--format pretty #{RADIANT_ROOT}/features&quot;
+    t.fork = true
+    t.cucumber_opts = ['--format', (ENV['CUCUMBER_FORMAT'] || 'pretty')]
+    t.feature_pattern = &quot;#{RADIANT_ROOT}/features/**/*.feature&quot;
   end
   task :features =&gt; 'db:test:prepare'
 rescue LoadError
+  desc 'Cucumber rake task not available'
   task :features do
-    puts &quot;Required dependency Cucumber is missing.\nRun 'rake gems:install RAILS_ENV=test'&quot;
+    abort 'Cucumber rake task is not available. Be sure to install cucumber as a gem or plugin'
   end
-end
\ No newline at end of file
+end</diff>
      <filename>lib/tasks/cucumber.rake</filename>
    </modified>
    <modified>
      <diff>@@ -72,7 +72,8 @@ begin
       end
     end
     Cucumber::Rake::Task.new(:integration) do |t|
-      t.cucumber_opts = &quot;--format progress #{RADIANT_ROOT}/features&quot;
+      t.cucumber_opts = [&quot;--format&quot;,&quot;progress&quot;]
+      t.feature_pattern = &quot;#{RADIANT_ROOT}/features/**/*.feature&quot;
     end
   
     desc 'Run all specs in spec/generators directory'</diff>
      <filename>lib/tasks/rspec.rake</filename>
    </modified>
    <modified>
      <diff>@@ -1,7 +1,8 @@
 #!/usr/bin/env ruby
 begin
   load File.expand_path(File.dirname(__FILE__) + &quot;/../vendor/plugins/cucumber/bin/cucumber&quot;)
-rescue LoadError
+rescue LoadError =&gt; e
+  raise unless e.to_s =~ /cucumber/  
   require &quot;rubygems&quot;
   load File.join(Gem.bindir, &quot;cucumber&quot;)
 end
\ No newline at end of file</diff>
      <filename>script/cucumber</filename>
    </modified>
    <modified>
      <diff>@@ -35,4 +35,10 @@ describe Admin::PreferencesController do
     user = users(:non_admin)
     user.password.should == user.sha1('funtimes')
   end
+  
+  it &quot;should use the User.protected_attributes for checking valid_params?&quot; do
+    User.should_receive(:protected_attributes).at_least(:once).and_return([:password, :password_confirmation, :email])
+    login_as :non_admin
+    put :update, { :user =&gt; { :password =&gt; 'funtimes', :password_confirmation =&gt; 'funtimes' } }
+  end
 end</diff>
      <filename>spec/controllers/admin/preferences_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -23,9 +23,9 @@ describe Admin::WelcomeController do
   end
   
   it &quot;should render the login template when login failed&quot; do
+    controller.should_receive(:announce_invalid_user) # Can't test flash.now!
     post :login, :user =&gt; {:login =&gt; &quot;admin&quot;, :password =&gt; &quot;wrong&quot;}
     response.should render_template(&quot;login&quot;)
-    flash[:error].should_not be_nil
   end
   
   describe &quot;remember me&quot; do</diff>
      <filename>spec/controllers/admin/welcome_controller_spec.rb</filename>
    </modified>
    <modified>
      <diff>@@ -17,6 +17,21 @@ describe User, &quot;validations&quot; do
     assert_valid :email, ('x' * 246) + '@test.com'
   end
   
+  
+  describe &quot;self.protected_attributes&quot; do
+    it &quot;should be an array of [:password, :password_confirmation, :email]&quot; do
+      # Make sure we clean up after anything set in another spec
+      User.instance_variable_set(:@protected_attributes, nil)
+      User.protected_attributes.should == [:password, :password_confirmation, :email]
+    end
+  end
+  describe &quot;self.protected_attributes=&quot; do
+    it &quot;should set the @@protected_attributes variable to the given array&quot; do
+      User.protected_attributes = [:password, :email, :other]
+      User.protected_attributes.should == [:password, :email, :other]
+    end
+  end
+  
   it 'should validate length ranges' do
     {
       :login =&gt; 3..40,</diff>
      <filename>spec/models/user_spec.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>afa15789ae7fe68086b4b16c6dbe99bf54d07a50</id>
    </parent>
  </parents>
  <author>
    <name>Sean Cribbs</name>
    <email>seancribbs@gmail.com</email>
  </author>
  <url>http://github.com/radiant/radiant/commit/219f2bf0419673beaebfee30af3cac94567bcd39</url>
  <id>219f2bf0419673beaebfee30af3cac94567bcd39</id>
  <committed-date>2009-06-06T10:35:16-07:00</committed-date>
  <authored-date>2009-06-06T10:35:16-07:00</authored-date>
  <message>Update Cucumber and RSpec, clean up some features and fix specs.</message>
  <tree>094a28183d3124ff30bbc39ca85db32c2ae24b61</tree>
  <committer>
    <name>Sean Cribbs</name>
    <email>seancribbs@gmail.com</email>
  </committer>
</commit>
