Permalink
Browse files

Move factories into govuk_content_models

  • Loading branch information...
1 parent 2821c35 commit 3e348ac38ac6b22172db74344e34af2ebaf4bcf7 @jamiecobbett jamiecobbett committed Jun 27, 2012
Showing with 14 additions and 26 deletions.
  1. +2 −2 Gemfile
  2. +9 −9 Gemfile.lock
  3. +2 −0 features/support/artefacts.rb
  4. +0 −8 test/factories/artefact_factory.rb
  5. +0 −7 test/factories/tag_factory.rb
  6. +1 −0 test/test_helper.rb
View
@@ -34,7 +34,7 @@ gem "bson", "1.5.2"
if ENV['CONTENT_MODELS_DEV']
gem "govuk_content_models", :path => '../govuk_content_models'
else
- gem "govuk_content_models", "~> 0.1.00"
+ gem "govuk_content_models", "0.1.6"
end
if ENV['BUNDLE_DEV']
@@ -60,7 +60,7 @@ group :test do
gem 'database_cleaner'
gem 'minitest'
gem "shoulda", "~> 2.11.3"
- gem 'factory_girl'
+ gem 'factory_girl', "3.3.0"
gem 'factory_girl_rails'
gem 'capybara-mechanize', '~> 0.3.0.rc3'
gem 'launchy'
View
@@ -94,16 +94,16 @@ GEM
actionmailer (>= 3.0.4)
execjs (1.2.13)
multi_json (~> 1.0)
- factory_girl (2.4.0)
- activesupport
- factory_girl_rails (1.5.0)
- factory_girl (~> 2.4.0)
+ factory_girl (3.3.0)
+ activesupport (>= 3.0.0)
+ factory_girl_rails (3.3.0)
+ factory_girl (~> 3.3.0)
railties (>= 3.0.0)
fakeweb (1.3.0)
faraday (0.8.1)
multipart-post (~> 1.1)
ffi (1.0.11)
- gds-api-adapters (0.0.49)
+ gds-api-adapters (0.0.50)
lrucache (~> 0.1.1)
null_logger
plek
@@ -118,7 +118,7 @@ GEM
json
gherkin (2.7.3)
json (>= 1.4.6)
- govuk_content_models (0.1.0)
+ govuk_content_models (0.1.6)
bson_ext
differ
gds-api-adapters
@@ -147,7 +147,7 @@ GEM
nokogiri (~> 1.4)
webrobots (~> 0.0, >= 0.0.9)
metaclass (0.0.1)
- mime-types (1.18)
+ mime-types (1.19)
minitest (2.10.0)
mocha (0.10.1)
metaclass (~> 0.0.1)
@@ -269,7 +269,7 @@ DEPENDENCIES
cucumber-rails
database_cleaner
exception_notification
- factory_girl
+ factory_girl (= 3.3.0)
factory_girl_rails
fakeweb
formtastic!
@@ -278,7 +278,7 @@ DEPENDENCIES
gds-sso (= 0.7.0)
gds-warmup-controller
gelf
- govuk_content_models (~> 0.1.00)
+ govuk_content_models (= 0.1.6)
launchy
minitest
mocha
@@ -1,3 +1,5 @@
+require 'govuk_content_models/test_helpers/factories'
+
def create_artefact
Factory.create :artefact, :name => 'Child Benefit rates', :need_id => 1
end
@@ -1,8 +0,0 @@
-FactoryGirl.define do
- factory :artefact do
- sequence(:name) { |n| "Artefact #{n}" }
- sequence(:slug) { |n| "artefact-#{n}" }
- kind Artefact::FORMATS.first
- owning_app 'publisher'
- end
-end
@@ -1,7 +0,0 @@
-FactoryGirl.define do
- factory :tag do
- sequence(:tag_id) { |n| "crime-and-justice/the-police-#{n}" }
- sequence(:title) { |n| "The title #{n}" }
- tag_type "section"
- end
-end
View
@@ -13,6 +13,7 @@
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'mocha'
+require 'govuk_content_models/test_helpers/factories'
FakeWeb.allow_net_connect = false
DatabaseCleaner.strategy = :truncation

0 comments on commit 3e348ac

Please sign in to comment.