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
Spec2 seems to mangle "#[]" and "#[]?" into the same module name Spec2___Root::Spec2__Array::Spec2___.
This results in the error already initialized constant Spec2___Root::Spec2__Array::Spec2___::SPEC2_FULL_CONTEXT
PlatformCrystal 0.19.4 (2016-10-07) on Linux, Spec2 at eef5144
Code snippet
require"spec2"Spec2.describe Arraydo
describe "#[]?"do# Each on their own is fine
it "returns nil"do
expect(([ 3, 4 ])[2]?).to be_nil
endend
describe "#[]"do
it "raises IndexError"do
expect{ ([ 3, 4 ])[2] }.to raise_error IndexErrorendendend
Note: This also happens with #[]=
Thanks
The text was updated successfully, but these errors were encountered:
Papierkorb
changed the title
Error when describing #[] and #[]?
Error when describing array method names like #[]?
Nov 2, 2016
Papierkorb
changed the title
Error when describing array method names like #[]?
Error when describing multiple array method names like #[] and #[]?
Nov 2, 2016
I guess, we ought to transform special symbols into some meaningful words. For example #[]= will become: __sharp____openbrace____closebrace____equals__. Are you up for making a pull request?
Also, it can be worked around in your code with specifying some sort of conceptual description in your describe after the name of the method:
describe "#[] - index accessing operator"do# ..end
Hello,
Spec2 seems to mangle "#[]" and "#[]?" into the same module name
Spec2___Root::Spec2__Array::Spec2___
.This results in the error
already initialized constant Spec2___Root::Spec2__Array::Spec2___::SPEC2_FULL_CONTEXT
Platform
Crystal 0.19.4 (2016-10-07)
on Linux, Spec2 at eef5144Code snippet
Note: This also happens with
#[]=
Thanks
The text was updated successfully, but these errors were encountered: