Skip to content

Commit

Permalink
Factory girl integrated into spec, working fine :)
Browse files Browse the repository at this point in the history
  • Loading branch information
rorra committed May 27, 2011
1 parent b8c2cbe commit 704cb1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/spec_helper.rb
@@ -1,4 +1,7 @@
require 'rbconfig'
require 'factory_girl'
require File.dirname(__FILE__) + '/../testing/spec/support/controller_macros.rb'

def setup_environment
# This file is copied to ~/spec when you run 'rails generate rspec'
# from the project root directory.
Expand Down Expand Up @@ -29,6 +32,7 @@ def setup_environment
config.use_instantiated_fixtures = false

config.include Devise::TestHelpers, :type => :controller
config.extend ControllerMacros, :type => :controller

Factory.definition_file_paths = [File.join(Rails.root, 'testing', 'spec', 'factories')]
Factory.find_definitions
Expand Down
4 changes: 4 additions & 0 deletions testing/spec/spec_helper.rb
@@ -1,4 +1,7 @@
require 'rbconfig'
require 'factory_girl'
require File.dirname(__FILE__) + '/../testing/spec/support/controller_macros.rb'

def setup_environment
# This file is copied to ~/spec when you run 'rails generate rspec'
# from the project root directory.
Expand Down Expand Up @@ -29,6 +32,7 @@ def setup_environment
config.use_instantiated_fixtures = false

config.include Devise::TestHelpers, :type => :controller
config.extend ControllerMacros, :type => :controller

Factory.definition_file_paths = [File.join(Rails.root, 'testing', 'spec', 'factories')]
Factory.find_definitions
Expand Down

0 comments on commit 704cb1b

Please sign in to comment.