burke / zeus

Boot any rails app in under a second.
MIT License
3.33k stars 231 forks source link

re-support rspec 2 #618

Closed skytos closed 7 years ago

skytos commented 7 years ago

Description of Problem

zeus rspec fails for rspec 2 since the invoke method does not exist on RSpec::Core::Runner until rspec 3

System details

Steps to Reproduce

1) zeus start in a rails project with rails 2

2) zeus rspec

Observed Behavior

/usr/local/var/rbenv/versions/2.1.5/lib/ruby/gems/2.1.0/gems/zeus-0.15.12/lib/zeus/rails.rb:207:in `test': undefined method `invoke' for RSpec::Core::Runner:Class (NoMethodError)

Expected Behavior

sideshowcoder commented 7 years ago

Makes a lot of sense to me. Not that well versed in RSpec but I'm wondering if there is a way to test this so we can avoid regression? Maybe have 2 Gemfiles one with RSpec 2 and one with RSpec 3 and run both on Travis?

Thanks for the work! I'm happy to merge this, would be even happier if we had a test 👍

skytos commented 7 years ago

I'll look into a way to test it. Maybe something like https://github.com/thoughtbot/appraisal can help? On Jan 12, 2017 6:59 AM, "Philipp Fehre" notifications@github.com wrote:

Makes a lot of sense to me. Not that well versed in RSpec but I'm wondering if there is a way to test this so we can avoid regression? Maybe have 2 Gemfiles one with RSpec 2 and one with RSpec 3 and run both on Travis?

Thanks for the work! I'm happy to merge this, would be even happier if we had a test 👍

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/burke/zeus/pull/618#issuecomment-272184753, or mute the thread https://github.com/notifications/unsubscribe-auth/AFMa3-ZFhmpTH0fpFZcjoWYw8Q6Ec_0Kks5rRj_CgaJpZM4LhN4O .

sideshowcoder commented 7 years ago

Sounds reasonable, happy to try to help let me know how it goes.

sideshowcoder commented 7 years ago

fixes #588

skytos commented 7 years ago

I'm not coming up with any great ways to test this other than having a couple dummy apps that require zeus and different versions of rspec. I don't see how to integrate that with the current test setup since the tests are rspec tests themselves and they don't work with rspec2 syntax. I could add a new make task that test-rubygem depends upon but it seems pretty heavy weight. @sideshowcoder does that seem like a path worth pursuing or did you have another idea?

sideshowcoder commented 7 years ago

Well I think if it is to heavy weight I'm fine with just leaving it as is to be honest. :) Thanks for taking a looks so!