You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the same transpec version, ruby version, rspec-mocks SHA, transpec command, etc as I documented in #88, I found that transpec wrongly transformed some spec files that had nesting like this:
/Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/example_group.rb:214:in `block in define_example_group_method': Creating an isolated context from within a context is not allowed. Change `RSpec.context` to `context` or move this to a top-level scope. (RuntimeError)
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/dsl.rb:41:in `block in expose_example_group_alias'
from /Users/myron/code/rspec-dev/repos/rspec-mocks/spec/rspec/mocks/expiration_spec.rb:57:in `block in <module:Mocks>'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/example_group.rb:333:in `module_exec'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/example_group.rb:333:in `subclass'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/example_group.rb:229:in `block in define_example_group_method'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/dsl.rb:41:in `block in expose_example_group_alias'
from /Users/myron/code/rspec-dev/repos/rspec-mocks/spec/rspec/mocks/expiration_spec.rb:3:in `<module:Mocks>'
from /Users/myron/code/rspec-dev/repos/rspec-mocks/spec/rspec/mocks/expiration_spec.rb:2:in `<module:RSpec>'
from /Users/myron/code/rspec-dev/repos/rspec-mocks/spec/rspec/mocks/expiration_spec.rb:1:in `<top (required)>'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/configuration.rb:1078:in `load'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/configuration.rb:1078:in `block in load_spec_files'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/configuration.rb:1078:in `each'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/configuration.rb:1078:in `load_spec_files'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/runner.rb:97:in `setup'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/runner.rb:85:in `run'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/runner.rb:70:in `run'
from /Users/myron/code/rspec-dev/repos/rspec-core/lib/rspec/core/runner.rb:38:in `invoke'
from /Users/myron/code/rspec-dev/repos/rspec-core/exe/rspec:4:in `<top (required)>'
from bin/rspec:12:in `load'
from bin/rspec:12:in `<main>'
The text was updated successfully, but these errors were encountered:
This also seems to be caused by -s/--skip-dynamic-analysis, but maybe this can be handled with the static context inspector (of course not perfect though). I'll take a look.
Thanks. I didn't realize how important the dynamic analysis was. From prior conversations I knew it got involved in things like picking how to convert the collection matchers but had no idea it got involved in the RSpec. bit.
Using the same transpec version, ruby version, rspec-mocks SHA, transpec command, etc as I documented in #88, I found that transpec wrongly transformed some spec files that had nesting like this:
...into:
...which leads to an RSpec error:
The text was updated successfully, but these errors were encountered: