Platform: JRuby 1.7.21
RSpec version: 3.2.0
Other details of application: Sinatra server running against ActiveRecord
(no rails or rspec-rails)
Test extras: FactoryGirl, Simplecov
The issue is as follows. I run rspec either with
> jruby -S rake spec
>
or
> jruby -S bundle exec rspec
>
Before the upgrade, I am able to run my full test suite with either
command. (1900 examples or so)
After the upgrade, I get the following odd behavior:
- When I run the full test suite, it runs a single file only. Seemingly,
it picks up the first test file when looking at the file and folder
structure alphabetically.
- When I try to target a file other than the one that is run with the
full command, it says *0 examples, 0 failures*
I've tried the following things to remedy / confirm the situation.
- Upgrading to the latest rspec
- Downgrading AR to see if some unrelated change caused this. It works
again on 4.0.13.
- Disabling simplecov and almost everything else other than factory girl
in my test suite
- Fiddling with rspec configuration via both .rspec file and config
block in spec_helper
- Dropping include of FactoryGirl::Syntax::Methods from my rspec config
block.
- This one gives ~1300 examples and failures.
- Wasn't to get any other traction here, and its not really feasible
for to remove it from my test suite.
Rough outline of my spec_helper.rb is at the bottom of post, I omitted a
few things and replaced with < description of what it was >
Please let me know if anybody has seen this problem, has any ideas as to
what might cause it or fix it. I'm at a loss here. Happy to provide any
other relevant details.
Thanks,
Brendan
# coding: UTF-8
require "bundler/setup"
< set an environment variable >
require 'pp'
require "rspec"
require 'rspec/collection_matchers'
require "factory_girl"
require 'simplecov'
require 'sidekiq/testing'
SimpleCov.start do
add_filter('.bundle')
add_filter('spec')
# Write coverage output to CircleCI's artifacts directory
if ENV['CIRCLE_ARTIFACTS']
dir = File.join("..", "..", "..", ENV['CIRCLE_ARTIFACTS'], "coverage")
coverage_dir(dir)
end
end
< require two app-specific helper files >
FactoryGirl.find_definitions
< code that connects to database >
RSpec.configure do |config|
config.include FactoryGirl::Syntax::Methods
end
--
You received this message because you are subscribed to the Google Groups
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/rspec/8b458e20-f133-4174-8722-a4e9ea2bb59d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.