Skip to content
This repository
Browse code

Shuffle spec files on each run and make them green on Travis.

  • Loading branch information...
commit e5ea947dfa32e996ef96350d1df6d8af41ffc8de 1 parent 580c52b
Eloy Durán alloy authored
10 Rakefile
@@ -56,14 +56,18 @@ namespace :ext do
56 56 end
57 57
58 58 namespace :spec do
  59 + def specs(dir)
  60 + FileList["spec/#{dir}/*_spec.rb"].shuffle.join(' ')
  61 + end
  62 +
59 63 desc "Run the unit specs"
60 64 task :unit do
61   - sh "bacon spec/unit/*_spec.rb spec/unit/**/*_spec.rb -q"
  65 + sh "bacon #{specs('unit/**')} -q"
62 66 end
63 67
64 68 desc "Run the functional specs"
65 69 task :functional => "ext:cleanbuild" do
66   - sh "bacon spec/functional/*_spec.rb"
  70 + sh "bacon #{specs('functional/**')}"
67 71 end
68 72
69 73 desc "Run the integration spec"
@@ -72,7 +76,7 @@ namespace :spec do
72 76 end
73 77
74 78 task :all => "ext:cleanbuild" do
75   - sh "bacon #{FileList['spec/**/*_spec.rb'].join(' ')}"
  79 + sh "bacon #{specs('**')}"
76 80 end
77 81
78 82 desc "Run all specs and build all examples"
1  lib/cocoapods/dependency.rb
@@ -176,7 +176,6 @@ def copy_external_source_into_sandbox(sandbox)
176 176 end
177 177
178 178 def description
179   - # TODO did we have a version number here too before?
180 179 "from `#{@params[:podspec]}'"
181 180 end
182 181 end
2  spec/functional/command_spec.rb
@@ -54,6 +54,8 @@ def command.master_repo_url; SpecHelper.fixture('spec-repos/master'); end
54 54 end
55 55
56 56 before do
  57 + Pod::Source.reset!
  58 + Pod::Spec::Set.reset!
57 59 config.repos_dir = fixture('spec-repos')
58 60 end
59 61

0 comments on commit e5ea947

Please sign in to comment.
Something went wrong with that request. Please try again.