Commit 77d6f11f08c958c55d00018ccd578ef54da05466
1 parent
a0850085
Exists in
master
and in
1 other branch
Fix issue with spec fabrication on ruby 1.8.7
In 1.8.7 the Symbol#<=> is not define. We can't sort directly array of Symbol, we need define how we sort it
Showing
1 changed file
with
2 additions
and
1 deletions
Show diff stats
spec/fabricators_spec.rb
... | ... | @@ -7,7 +7,8 @@ Fabrication::Config.fabricator_dir.each do |folder| |
7 | 7 | end |
8 | 8 | |
9 | 9 | describe "Fabrication" do |
10 | - Fabrication::Fabricator.schematics.keys.sort.each do |fabricator_name| | |
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| | |
11 | 12 | context "Fabricate(:#{fabricator_name})" do |
12 | 13 | subject { Fabricate.build(fabricator_name) } |
13 | 14 | ... | ... |