Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

fix for file system order bug in linux/tddium #238

Closed
wants to merge 1 commit into from

2 participants

@narath

In order for clearance integration tests to work on linux systems (as used by tddium) you need to include all the integration helper files explicity since the sort order on the linux systems is not the same as on mac systems, and without it all specs will fail.

@narath narath In order for clearance integration tests to work on linux systems (as…
… used by tddium) you need to include all the integration helper files explicity since the sort order on the linux systems is not the same as on mac systems, and without it all specs will fail.
4e78255
@mike-burns
Owner

Hi @narath , thanks for this!

I'm all for adding require everywhere (no joke; I love require), but I cannot reproduce the problem you suggest. Is there a particular FS I need, or something else?

@narath
@mike-burns
Owner

I still can't repro locally, but it seems that our Travis CI build is failing for the same reason: https://travis-ci.org/thoughtbot/clearance/jobs/3895549

Is the #sort needed?

@narath
@mike-burns
Owner

Merged with slight changes. Thanks for tracking this down, @narath !

@mike-burns mike-burns closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 7, 2012
  1. @narath

    In order for clearance integration tests to work on linux systems (as…

    narath authored
    … used by tddium) you need to include all the integration helper files explicity since the sort order on the linux systems is not the same as on mac systems, and without it all specs will fail.
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/generators/clearance/specs/templates/support/integration.rb
View
2  lib/generators/clearance/specs/templates/support/integration.rb
@@ -1,3 +1,5 @@
+Dir[Rails.root.join("spec/support/integration/*.rb")].sort.each {|f| require f}
+
RSpec.configure do |config|
config.include Integration::ClearanceHelpers, :type => :request
config.include Integration::ActionMailerHelpers, :type => :request
Something went wrong with that request. Please try again.