Skip to content

Commit

Permalink
Fix deprecation warnings with Rails 3.2.7
Browse files Browse the repository at this point in the history
  • Loading branch information
mshibuya committed Jul 27, 2012
1 parent da1addf commit f223184
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
22 changes: 11 additions & 11 deletions spec/integration/authorization/cancan_spec.rb
Expand Up @@ -47,7 +47,7 @@ def initialize(user)

describe "with no roles" do
before(:each) do
@user.update_attribute(:roles, [])
@user.update_attributes(:roles => [])
end

it "GET /admin should raise CanCan::AccessDenied" do
Expand All @@ -63,7 +63,7 @@ def initialize(user)

describe "with read player role" do
before(:each) do
@user.update_attribute(:roles, [:admin, :read_player])
@user.update_attributes(:roles => [:admin, :read_player])
end

it "GET /admin should show Player but not League" do
Expand Down Expand Up @@ -111,7 +111,7 @@ def initialize(user)

describe "with create and read player role" do
before(:each) do
@user.update_attribute(:roles, [:admin, :read_player, :create_player])
@user.update_attributes(:roles => [:admin, :read_player, :create_player])
end

it "GET /admin/player/new should render and create record upon submission" do
Expand Down Expand Up @@ -144,7 +144,7 @@ def initialize(user)

describe "with update and read player role" do
before(:each) do
@user.update_attribute(:roles, [:admin, :read_player, :update_player])
@user.update_attributes(:roles => [:admin, :read_player, :update_player])
end

it "GET /admin/player/1/edit should render and update record upon submission" do
Expand Down Expand Up @@ -179,7 +179,7 @@ def initialize(user)
describe "with history role" do
it 'shows links to history action' do

@user.update_attribute(:roles, [:admin, :read_player, :history_player])
@user.update_attributes(:roles => [:admin, :read_player, :history_player])
@player = FactoryGirl.create :player

visit index_path(:model_name => "player")
Expand All @@ -200,7 +200,7 @@ def initialize(user)
describe "with show in app role" do
it 'shows links to show in app action' do

@user.update_attribute(:roles, [:admin, :read_player, :show_in_app_player])
@user.update_attributes(:roles => [:admin, :read_player, :show_in_app_player])
@player = FactoryGirl.create :player

visit index_path(:model_name => "player")
Expand All @@ -223,7 +223,7 @@ def initialize(user)
describe "with all roles" do
it 'shows links to all actions' do

@user.update_attribute(:roles, [:admin, :manage_player])
@user.update_attributes(:roles => [:admin, :manage_player])
@player = FactoryGirl.create :player

visit index_path(:model_name => "player")
Expand All @@ -245,7 +245,7 @@ def initialize(user)

describe "with destroy and read player role" do
before(:each) do
@user.update_attribute(:roles, [:admin, :read_player, :destroy_player])
@user.update_attributes(:roles => [:admin, :read_player, :destroy_player])
end

it "GET /admin/player/1/delete should render and destroy record upon submission" do
Expand Down Expand Up @@ -286,7 +286,7 @@ def initialize(user)

describe "with exception role" do
it "GET /admin/player/bulk_delete should render records which are authorized to" do
@user.update_attribute(:roles, [:admin, :test_exception])
@user.update_attributes(:roles => [:admin, :test_exception])
active_player = FactoryGirl.create :player, :retired => false
retired_player = FactoryGirl.create :player, :retired => true

Expand All @@ -297,7 +297,7 @@ def initialize(user)
end

it "POST /admin/player/bulk_destroy should destroy records which are authorized to" do
@user.update_attribute(:roles, [:admin, :test_exception])
@user.update_attributes(:roles => [:admin, :test_exception])
active_player = FactoryGirl.create :player, :retired => false
retired_player = FactoryGirl.create :player, :retired => true

Expand All @@ -316,7 +316,7 @@ def initialize(user)

describe "with admin role only" do
before(:each) do
@user.update_attribute(:roles, [:admin])
@user.update_attributes(:roles => [:admin])
end

it "GET /admin/team should render successfully" do
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/basic/show/rails_admin_basic_show_spec.rb
Expand Up @@ -39,7 +39,7 @@
before(:each) do
@player = FactoryGirl.create :player
@team = FactoryGirl.create :team
@player.update_attribute(:team_id, @team.id)
@player.update_attributes(:team_id => @team.id)
visit show_path(:model_name => "player", :id => @player.id)
end

Expand Down

0 comments on commit f223184

Please sign in to comment.