Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Upgrade to new factory_girl 3 syntax

  • Loading branch information...
commit 0c914b910f098c3eb013f82209c56629e7fabd8a 1 parent 35a1e16
@sferik authored
View
4 rails_admin.gemspec
@@ -13,14 +13,14 @@ Gem::Specification.new do |gem|
gem.add_dependency 'jquery-rails', '>= 1.0'
gem.add_dependency 'kaminari', '~> 0.12'
gem.add_dependency 'rack-pjax', '~> 0.5'
- gem.add_dependency 'rails', '~>3.1'
+ gem.add_dependency 'rails', '~> 3.1'
gem.add_dependency 'remotipart', '~> 1.0'
gem.add_development_dependency 'capybara'
gem.add_development_dependency 'carrierwave'
gem.add_development_dependency 'database_cleaner'
gem.add_development_dependency 'devise'
gem.add_development_dependency 'dragonfly'
- gem.add_development_dependency 'factory_girl', '~>2.6'
+ gem.add_development_dependency 'factory_girl'
gem.add_development_dependency 'generator_spec'
gem.add_development_dependency 'launchy'
gem.add_development_dependency 'mini_magick'
View
10 spec/unit/adapters/active_record/abstract_object_spec.rb
@@ -38,7 +38,7 @@
end
describe "a record with protected attributes and has_one association" do
- let(:draft) { Factory :draft }
+ let(:draft) { FactoryGirl.create(:draft) }
let(:number) { draft.player.number + 1 } # to avoid collision
before do
@@ -62,7 +62,7 @@
let(:league) { League.new }
let(:object) { RailsAdmin::Adapters::ActiveRecord::AbstractObject.new league }
let(:name) { "Awesome League" }
- let(:teams) { [Factory(:team)] }
+ let(:teams) { [FactoryGirl.create(:team)] }
let(:divisions) { [Division.create!(:name => 'div 1', :league => League.create!(:name => 'north')), Division.create!(:name => 'div 2', :league => League.create!(:name => 'south'))] }
before do
@@ -82,9 +82,9 @@
describe "a record with protected attributes and has_one association" do
let(:name) { "Stefan Koza" }
let(:suspended) { true }
- let(:player) { Factory :player, :suspended => true, :name => name, :draft => Factory(:draft) }
+ let(:player) { FactoryGirl.create(:player, :suspended => true, :name => name, :draft => FactoryGirl.create(:draft)) }
let(:object) { RailsAdmin::Adapters::ActiveRecord::AbstractObject.new player }
- let(:new_team) { Factory :team }
+ let(:new_team) { FactoryGirl.create(:team) }
let(:new_suspended) { false }
let(:new_draft) { nil }
let(:new_number) { player.number + 29 }
@@ -106,7 +106,7 @@
end
describe "destroy" do
- let(:player) { Factory :player }
+ let(:player) { FactoryGirl.create(:player) }
let(:object) { RailsAdmin::Adapters::ActiveRecord::AbstractObject.new player }
before do
Please sign in to comment.
Something went wrong with that request. Please try again.