Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed rspec1? method to work correctly #263

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sshao
Copy link

@sshao sshao commented May 20, 2015

previous implementation would always return true: declaring Spork::Test::Framework::RSpec < Spork::TestFramework causes defined?(RSpec) to always be true within the scope of Spork::Test::Framework::RSpec. see this gist for a pure ruby reproduction of this behavior.

the spork spec suite already contains tests for rspec1 support, but did not catch this bug because the tests stub the rspec1? method. I couldn't think of a way to fix the tests to catch this behavior, as it would require removing/stubbing out the ::RSpec constant for that example, but since the test suite itself uses RSpec 2 to run, removal of ::RSpec would then break the test runner.

previous implementation would always return true:
declaring Spork::Test::Framework::RSpec < Spork::TestFramework
causes defined?(RSpec) to always be true within the scope of
Spork::Test::Framework::RSpec.

see https://gist.github.com/sshao/e8c975ae4a45b2fdf512 for
a pure ruby reproduction of this behavior
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant