Commit 7c977e48cc26eabbf1b2c898688236f271795af1

Authored by Cyril Mougel
1 parent 11b08204
Exists in master and in 1 other branch production

Move the spec fabricator in model spec. It's more related

.gitignore
... ... @@ -18,3 +18,4 @@ bin
18 18 bundle
19 19 coverage
20 20 *#
  21 +.ruby-version
... ...
spec/fabricators_spec.rb
... ... @@ -1,18 +0,0 @@
1   -require 'spec_helper'
2   -
3   -Fabrication::Config.fabricator_dir.each do |folder|
4   - Dir.glob(File.join(Rails.root, folder, '**', '*.rb')).each do |file|
5   - require file
6   - end
7   -end
8   -
9   -describe "Fabrication" do
10   - #TODO : when 1.8.7 drop support se directly Symbol#sort
11   - Fabrication::Fabricator.schematics.keys.sort_by(&:to_s).each do |fabricator_name|
12   - context "Fabricate(:#{fabricator_name})" do
13   - subject { Fabricate.build(fabricator_name) }
14   -
15   - it { should be_valid }
16   - end
17   - end
18   -end
spec/models/fabricators_spec.rb 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +require 'spec_helper'
  2 +
  3 +Fabrication::Config.fabricator_dir.each do |folder|
  4 + Dir.glob(File.join(Rails.root, folder, '**', '*.rb')).each do |file|
  5 + require file
  6 + end
  7 +end
  8 +
  9 +describe "Fabrication" do
  10 + #TODO : when 1.8.7 drop support se directly Symbol#sort
  11 + Fabrication::Fabricator.schematics.keys.sort_by(&:to_s).each do |fabricator_name|
  12 + context "Fabricate(:#{fabricator_name})" do
  13 + subject { Fabricate.build(fabricator_name) }
  14 +
  15 + it { should be_valid }
  16 + end
  17 + end
  18 +end
... ...