Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Running the full test suite - problem with dependencies on rails apps #228

Closed
sharnik opened this Issue · 5 comments

3 participants

@sharnik

I'm trying to follow the instructions on running the complete test suite from https://github.com/nesquena/rabl/wiki/Running-Tests

Unfortunately, it seems that the dependencies are not installed correctly:
https://gist.github.com/b40e101f5ed8dc60a740

@databyte
Collaborator

Looks like the main test ran but the fixtures are messing up. Jump into each fixture and see if something's missing there. Does rebundling within the fixture help? Does console work? I've been gone for over a week so I haven't checked latest on a clean box, I may have to create a new gemset and test myself if you don't see anything within a fixture's folder.

@nesquena
Owner

Starting from a new gemset

gem install bundler
bundle
rake test:setup
rake test:full

runs through all green. We need to figure out whats different in our setups. I am using same version of ruby 1.9.2. Maybe bundler? What version are you using?

@sharnik

Tried the same steps on a different machine and had the same problem.

I've went into fixtures directory and tried to run console for rails2 and rails3 fixtures. I needed to run bundle install in the fixture directories to be able to open console. However, when I ran rake test:full I still got:

*** Running tests for rails2... ***
rake aborted!
rails is not part of the bundle. Add it to Gemfile.

(See full trace by running task with --trace)
The Gemfile's dependencies are satisfied

*** Running tests for rails3... ***
rake aborted!
no such file to load -- rails/all

@sharnik

Bundler version - 1.1.3 ruby, rvm ruby version - 1.9.2-head

The previous machine had a similar setup: bundler 1.1.3, rvm ruby version - 1.9.2 (compiled a few days ago).

@databyte
Collaborator

It's interesting if you look at the output of your gist. It lists the root's Gemfile for the build each time because the output of each fixture's bundle is the same. You should see different gems being built for each fixture: https://gist.github.com/2501612

desc "Prepares the fixtures being tested by installing dependencies"
task "test:setup" do
  Dir[File.dirname(__FILE__) + "/fixtures/#{fixture_list}"].each do |fixture|
    puts "\n*** Setting up for #{File.basename(fixture)} tests ***\n"
    `export BUNDLE_GEMFILE=#{fixture}/Gemfile` if ENV['TRAVIS']
    puts `cd #{fixture}; mkdir -p tmp/cache; bundle install;`
  end
end

You looked up each fixture folder fine since the puts is outputting correctly. For whatever reason, you're not cd'ing into the folder but instead just running bundle install in the same folder over and over again.

Try breaking up that lasts system call in the Rakefile into multiple lines, check your current directory before the bundle and see what's going on.

I'm on zsh but that shouldn't matter. It's a simple shell command.

@nesquena nesquena closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.