Permalink
Browse files

Merge pull request #459 from rubygems/csm_fix_deprecated_fg

Fix deprecated FactoryGirl syntax.
  • Loading branch information...
2 parents 479cd6e + effbc6c commit 2dd57b430a6add813e47f108331cc174bc0f88cb @cmeiklejohn cmeiklejohn committed Sep 9, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 test/functional/versions_controller_test.rb
  2. +2 −2 test/unit/rubygem_test.rb
@@ -41,7 +41,7 @@ class VersionsControllerTest < ActionController::TestCase
@latest_version = create(:version, :built_at => 1.week.ago, :created_at => 1.day.ago)
@rubygem = @latest_version.rubygem
@versions = (1..5).map do |_|
- Factory(:version, :rubygem => @rubygem)
+ FactoryGirl.create(:version, :rubygem => @rubygem)
end
get :show, :rubygem_id => @rubygem.name, :id => @latest_version.number
end
@@ -121,8 +121,8 @@ class RubygemTest < ActiveSupport::TestCase
context "#public_versions_with_extra_version" do
setup do
- @first_version = Factory(:version, :rubygem => @rubygem, :number => '1.0.0', :position => 1)
- @extra_version = Factory(:version, :rubygem => @rubygem, :number => '0.1.0', :position => 2)
+ @first_version = FactoryGirl.create(:version, :rubygem => @rubygem, :number => '1.0.0', :position => 1)
+ @extra_version = FactoryGirl.create(:version, :rubygem => @rubygem, :number => '0.1.0', :position => 2)
end
should "include public versions" do
assert @rubygem.public_versions_with_extra_version(@extra_version).include?(@first_version)

0 comments on commit 2dd57b4

Please sign in to comment.