diff options
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/user.rb | 27 | ||||
-rw-r--r-- | spec/spec_helper.rb | 6 |
2 files changed, 4 insertions, 29 deletions
diff --git a/spec/factories/user.rb b/spec/factories/user.rb deleted file mode 100644 index 94fe1d0..0000000 --- a/spec/factories/user.rb +++ /dev/null @@ -1,27 +0,0 @@ -require 'refinerycms/all' -require 'refinery/role' - -Factory.define :user, :class => ::Refinery::User do |u| - u.sequence(:username) { |n| "person#{n}" } - u.sequence(:email) { |n| "person#{n}@cucumber.com" } - u.password "greenandjuicy" - u.password_confirmation "greenandjuicy" -end - -Factory.define :refinery_user, :parent => :user do |u| - u.roles { [ ::Refinery::Role[:refinery] ] } - - u.after_create do |user| - ::Refinery::Plugins.registered.each_with_index do |plugin, index| - user.plugins.create(:name => plugin.name, :position => index) - end - end -end - -Factory.define :refinery_translator, :parent => :user do |u| - u.roles { [ ::Refinery::Role[:refinery], ::Refinery::Role[:translator] ] } - - u.after_create do |user| - user.plugins.create(:name => 'refinery_pages', :position => 0) - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 441da1d..44506ce 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,9 +12,11 @@ Spork.prefork do require 'rspec/rails' require 'capybara/rspec' - require 'factory_girl' - require 'devise' require 'database_cleaner' + + require 'refinery/testing/factories' + require 'refinery/testing/controller_macros' + require 'refinery/testing/request_macros' Rails.backtrace_cleaner.remove_silencers! |