Commit 7c977e48cc26eabbf1b2c898688236f271795af1
1 parent
11b08204
Exists in
master
and in
1 other branch
Move the spec fabricator in model spec. It's more related
Showing
3 changed files
with
19 additions
and
18 deletions
Show diff stats
.gitignore
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 |
... | ... | @@ -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 | ... | ... |