The latest “stable” version of Integrity (v22) doesn’t play well with Rails 3 (or any other application using bundler 1.0). Basically the Integrity’s Gemfile is used in place of the application’s Gemfile when running the tests.
With a Rails 3 application you are likely to get:
no such file to load -- rails/all
A patched version of integrity v22 for bundler 1.0 is available on http://github.com/pcreux/integrity/tree/v22-bundler-1.0.0.rc.
You also need to force your Rails application to use its Gemfile. To do so, update the file /config/boot.rb
with the following:
require 'rubygems'
# Set up gems listed in the Gemfile.
GEMFILE_PATH = File.expand_path('../../Gemfile', __FILE__)
if File.exist?(GEMFILE_PATH)
# Force the rails 3 application to use its Gemfile
ENV['BUNDLE_GEMFILE'] = GEMFILE_PATH
require 'bundler'
Bundler.setup
end
That should make the trick!
. Bookmark the
permalink. Both comments and trackbacks are currently closed.
Get Integrity to play well with Rails 3 and Bundler 1.0
The latest “stable” version of Integrity (v22) doesn’t play well with Rails 3 (or any other application using bundler 1.0). Basically the Integrity’s Gemfile is used in place of the application’s Gemfile when running the tests.
With a Rails 3 application you are likely to get:
A patched version of integrity v22 for bundler 1.0 is available on http://github.com/pcreux/integrity/tree/v22-bundler-1.0.0.rc.
You also need to force your Rails application to use its Gemfile. To do so, update the file
/config/boot.rb
with the following:That should make the trick!