Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zeus rspec fails include required files, but rspec alone does fine

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

like image 635
Max Prokopov Avatar asked Dec 25 '12 12:12

Max Prokopov


1 Answers

I found this behavior was cause by

 require 'rspec/autotest'

in spec_helper.rb

like image 89
Max Prokopov Avatar answered Oct 19 '22 02:10

Max Prokopov