9

It's weird issue, zeus start running smoothly.

rspec spec/ does it's job flawless.

My spec_helper config is 
# encoding: UTF-8
require 'rubygems'

# This file is copied to spec/ when you run 'rails generate rspec:install'
ENV["RAILS_ENV"] ||= 'test'
require File.expand_path("../../config/environment", __FILE__)
require 'rspec/rails'
require 'email_spec'
require 'rspec/autorun'
require 'capybara/rspec'
require 'shoulda-matchers'
require 'shoulda/matchers/integrations/rspec'

Dir["./spec/support/**/*.rb"].sort.each {|f| require f}

RSpec.configure do |config|

  config.include FactoryGirl::Syntax::Methods
  config.include Devise::TestHelpers, type: :controller
  config.include Capybara::DSL, type: :request


  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.mock_with :rspec
  config.use_transactional_fixtures = true
end

I have shared contexts in spec/support/shared_contexts.rb (which is normally included). rspec spec/ passed all tests, then zeus rspec spec/ passed all tests and throws inclusion errors like this

`find_and_eval_shared': Could not find shared context "with signed user" (ArgumentError)

It tries to pass zeus rspec spec/models and then throws 'factory_girl' inclusion errors while rspec spec/models do it's job fine.

It appears to look like this issue https://github.com/burke/zeus/issues/175

Max Prokopov
  • 1,308
  • 11
  • 16

1 Answers1

20

I found this behavior was cause by

 require 'rspec/autotest'

in spec_helper.rb

Max Prokopov
  • 1,308
  • 11
  • 16
  • 7
    Commenting out `require 'rspec/autorun'` fixed the issue for me. – silasjmatson Apr 12 '13 at 00:51
  • Thanks a lot. Posted your solution to the github issue as well: https://github.com/burke/zeus/issues/134 – Cris Apr 19 '13 at 18:46
  • 1
    likewise, I found with version rspec_rails 2.13.0, that I had to comment out a similar line in spec_helper: `require 'rspec/autorun'` in order to eliminate a complete meltdown of my specs. – Tyler Gannon Apr 24 '13 at 23:42