Commit 10e3a0935c1f0e3cb17e0ce9791246ed374560df

Authored by Victor Costa
2 parents e0c8721a 5ff64d4f

Merge branch 'rails3' into rails3_stable

app/models/article.rb
... ... @@ -2,7 +2,7 @@ require 'hpricot'
2 2  
3 3 class Article < ActiveRecord::Base
4 4  
5   - attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent, :allow_members_to_edit, :translation_of_id, :language, :license_id, :parent_id, :display_posts_in_current_language, :category_ids, :posts_per_page, :moderate_comments, :accept_comments, :feed, :published, :source, :highlighted, :notify_comments, :display_hits, :slug, :external_feed_builder, :display_versions, :external_link
  5 + attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent, :allow_members_to_edit, :translation_of_id, :language, :license_id, :parent_id, :display_posts_in_current_language, :category_ids, :posts_per_page, :moderate_comments, :accept_comments, :feed, :published, :source, :highlighted, :notify_comments, :display_hits, :slug, :external_feed_builder, :display_versions, :external_link, :image_builder
6 6  
7 7 acts_as_having_image
8 8  
... ...
features/manage_users.feature
... ... @@ -15,7 +15,7 @@ Background:
15 15 Scenario: deactive user
16 16 When I follow "Deactivate user" within "tr[title='Joao Silva']"
17 17 And I confirm the "Do you want to deactivate this user?" dialog
18   - Then I should see "Activate user" within "tr[title='Joao Silva']"
  18 + Then the "tr[title='Joao Silva'] td.actions a.icon-activate-user" button should be enabled
19 19  
20 20 @selenium
21 21 Scenario: activate user
... ... @@ -23,7 +23,7 @@ Background:
23 23 Given I confirm the "Do you want to deactivate this user?" dialog
24 24 When I follow "Activate user" within "tr[title='Paulo Santos']"
25 25 And I confirm the "Do you want to activate this user?" dialog
26   - Then I should see "Deactivate user" within "tr[title='Paulo Santos']"
  26 + Then the "tr[title='Paulo Santos'] td.actions a.icon-deactivate-user" button should be enabled
27 27  
28 28 @selenium
29 29 Scenario: remove user
... ... @@ -36,7 +36,7 @@ Background:
36 36 Scenario: admin user
37 37 When I follow "Set admin role" within "tr[title='Joao Silva']"
38 38 And I confirm the "Do you want to set this user as administrator?" dialog
39   - Then I should see "Reset admin role" within "tr[title='Joao Silva']"
  39 + Then the "tr[title='Joao Silva'] td.actions a.icon-reset-admin-role" button should be enabled
40 40  
41 41 @selenium
42 42 Scenario: unadmin user
... ... @@ -44,4 +44,4 @@ Background:
44 44 And I confirm the "Do you want to set this user as administrator?" dialog
45 45 When I follow "Reset admin role" within "tr[title='Paulo Santos']"
46 46 And I confirm the "Do you want to reset this user as administrator?" dialog
47   - Then I should see "Set admin role" within "tr[title='Paulo Santos']"
  47 + Then the "tr[title='Paulo Santos'] td.actions a.icon-set-admin-role" button should be enabled
... ...
features/support/selenium.rb
... ... @@ -10,7 +10,7 @@ end
10 10  
11 11 # FIXME: 'DELETE FROM ...' is being ran 3x - see cucumber.log
12 12 DatabaseCleaner.clean_with :truncation
13   -DatabaseCleaner.strategy = :truncation
  13 +DatabaseCleaner.strategy = :truncation, {:pre_count => true, :reset_ids => false}
14 14  
15 15 Before do
16 16 DatabaseCleaner.start
... ...
test/unit/external_feed_test.rb
... ... @@ -142,7 +142,7 @@ class ExternalFeedTest &lt; ActiveSupport::TestCase
142 142 should 'save hour when feed was fetched' do
143 143 external_feed = create(:external_feed)
144 144  
145   - now = Time.parse('2009-01-23 09:35')
  145 + now = Time.zone.parse('2009-01-23 09:35')
146 146 Time.stubs(:now).returns(now)
147 147  
148 148 external_feed.finish_fetch
... ...