Permalink
Browse files

remove factory_girl_on_rails

  • Loading branch information...
1 parent 7f1e7f5 commit 4321c70de3c532b3dded2cda285c738da69e6336 @mike-burns mike-burns committed Oct 20, 2008
View
@@ -18,7 +18,7 @@ spec = Gem::Specification.new do |s|
s.email = "dcroak@thoughtbot.com"
s.homepage = "http://github.com/thoughtbot/clearance"
s.description = "Simple, complete Rails authentication scheme."
- s.authors = ["thoughtbot, inc.", "Dan Croak", "Josh Nichols", "Jason Morrison", "Mike Burns", "Mike Breen"]
+ s.authors = ["thoughtbot, inc.", "Josh Nichols", "Mike Breen"]
s.files = FileList["[A-Z]*", "{generators,lib,test}/**/*"]
end
@@ -66,4 +66,4 @@ def manifest
end
end
-end
+end
@@ -11,6 +11,7 @@
require 'mocha'
require 'factory_girl'
+require File.expand_path(File.dirname(__FILE__)) + '/factories'
class Test::Unit::TestCase
self.use_transactional_fixtures = true
Submodule thoughtbot-factory_girl-1.1.3 added at c88fc3
@@ -1,20 +0,0 @@
-Copyright (c) 2008 [name of plugin creator]
-
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,34 +0,0 @@
-factory_girl_on_rails
-=====================
-
-factory_girl_on_rails provides some minor creature comforts for using factory_girl on a Rails project:
-
- * Automatically load factories in RAILS_ROOT/test/factories
- * A generator for putting new factories in RAILS_ROOT/test/factories
-
-
-Installing
-==========
-
- script/plugin install git://github.com/technicalpickles/factory_girl_on_rails.git
-
-Example
-=======
-
-After installing this plugin, you just start using factories in RAILS_ROOT/test/factories.
-
-As a convenience, a factory generator is provided:
-
-`./script/generate factory account`
-
- creates an Account factory: test/factories/account_factory.rb
-
-`./script/generate factory post title:string body:text published:boolean`
-
- creates a Post factory with a string title, text body, and published flag.
-
-
-Copyright
-=========
-
-Copyright (c) 2008 Josh Nichols, released under the MIT license
@@ -1,9 +0,0 @@
-require 'factory_girl'
-
-%w(test spec).each do |dir|
- factories = File.join(RAILS_ROOT, dir, 'factories.rb')
- require factories if File.exists?(factories)
- Dir[File.join(RAILS_ROOT, dir, 'factories', '*.rb')].each do |file|
- require file
- end
-end
@@ -1,18 +0,0 @@
-Description:
- Stubs out a new factory. Pass the factory name name, under_scored,
- and an optional list of attribute pairs as arguments.
-
- Attribute pairs are column_name:sql_type arguments specifying the
- model's attributes. Timestamps are added by default, so you don't have to
- specify them by hand as 'created_at:datetime updated_at:datetime'.
-
- This generates a file in test/factories.
-
-Examples:
- `./script/generate factory account`
-
- creates an Account factory: test/factories/account_factory.rb
-
- `./script/generate factory post title:string body:text published:boolean`
-
- creates a Post factory with a string title, text body, and published flag.
@@ -1,17 +0,0 @@
-class FactoryGenerator < Rails::Generator::NamedBase
- def manifest
- record do |m|
- m.directory File.join('test/factories', class_path)
- m.template 'factory.rb', File.join('test/factories', class_path, "#{file_name}_factory.rb")
- end
- end
-
- def factory_line(attribute)
- "#{file_name}.#{attribute.name} '#{attribute.default}'"
- end
-
- protected
- def banner
- "Usage: #{$0} #{spec.name} FactoryName [field:type, field:type]"
- end
-end
@@ -1,5 +0,0 @@
-Factory.define :<%= file_name %> do |<%= file_name %>|
-<% for attribute in attributes -%>
- <%= factory_line(attribute) %>
-<% end -%>
-end
@@ -1,19 +0,0 @@
-# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-
-<% unless attributes.empty? -%>
-one:
-<% for attribute in attributes -%>
- <%= attribute.name %>: <%= attribute.default %>
-<% end -%>
-
-two:
-<% for attribute in attributes -%>
- <%= attribute.name %>: <%= attribute.default %>
-<% end -%>
-<% else -%>
-# one:
-# column: value
-#
-# two:
-# column: value
-<% end -%>
@@ -1,16 +0,0 @@
-class <%= migration_name %> < ActiveRecord::Migration
- def self.up
- create_table :<%= table_name %> do |t|
-<% for attribute in attributes -%>
- t.<%= attribute.type %> :<%= attribute.name %>
-<% end -%>
-<% unless options[:skip_timestamps] %>
- t.timestamps
-<% end -%>
- end
- end
-
- def self.down
- drop_table :<%= table_name %>
- end
-end
@@ -1,2 +0,0 @@
-class <%= class_name %> < ActiveRecord::Base
-end
@@ -1,7 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-
-class <%= class_name %>Test < ActiveSupport::TestCase
-<% for attribute in attributes -%>
- should_have_db_column :<%= attribute.name %>
-<% end -%>
-end

0 comments on commit 4321c70

Please sign in to comment.