I am using RSpec for unit and functional testing on a project. I have
however found the (experimental) RSpec stories to be un-intuitive in
some situations.
The RSpec plugins seems to disable the standard Rails Tests, so how
could I go about usng Integration tests alongside Rspec?
I am using RSpec for unit and functional testing on a project. I have
however found the (experimental) RSpec stories to be un-intuitive in
some situations.
The RSpec plugins seems to disable the standard Rails Tests
This is certainly not the intent. I’ve got projects which have both
Rails integration tests and RSpec specs and they play together
perfectly well. You just can’t run them together in one process.
rake
=> runs specs and tests (in two separate processes)
rake test
=> runs only tests
rake spec
=> runs only specs
What is leading you to believe that it is disabled?
I grep’d the rspec tree for this and couldn’t find it. Would you mind
taking a look in vendor/plugins/rspec/lib/spec/version.rb and tell me
the version and revision numbers?
MAJOR = 1
MINOR = 1
TINY = 0
RELEASE_CANDIDATE = nil
Also, what line in what file?
vendor/plugins/rspec/lib/spec.rb line 25.
I just want to make sure this isn’t a problem w/ the distribution (my
suspicion is it was added by the person from whom you inherited the
code, but I want to make sure).
Yeah, looks like one of many modifications in this system.
What is leading you to believe that it is disabled?
All the test tasks were running with RSpec rather than Test:unit, I
eventually found the offending line in rspec plugin
require ‘spec/test’ if Object.const_defined?(:Test)
I grep’d the rspec tree for this and couldn’t find it. Would you mind
taking a look in vendor/plugins/rspec/lib/spec/version.rb and tell me
the version and revision numbers?
Also, what line in what file?
I just want to make sure this isn’t a problem w/ the distribution (my
suspicion is it was added by the person from whom you inherited the
code, but I want to make sure).
Commented it out, and all is working as it should now.
Great!
Thanks,
David
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.