Comments (3)
Yeah, sadly this fails because Crystal doesn't allow the following:
def four
2 + 2
end
class Foo
@var = four
end
There's actually a TODO
in the code where this is a problem. I'll see what I can do to work around it.
from spectator.
Didn't mean to close this, but can you confirm that this is fixed in the latest version on master (0.9.2)? The code in your example works now. Hopefully that fixes any other issues with it that are non-trivial.
from spectator.
Yup it works now, very interesting way to bypass restrictions of crystal
from spectator.
Related Issues (20)
- Missing no_args equivalent HOT 3
- How to test when exit() is called? HOT 8
- Allow defining doubles without a block HOT 8
- let(...) { Constant } resolves the constant based on where the let is called, not where the let was defined HOT 1
- Cannot seem to test when new is called HOT 7
- Cannot stub methods on subject HOT 9
- Error: undefined constant TestValue HOT 5
- Strange error when defining let(size) and calling subject.size HOT 2
- stub method(arg1,arg2,...) syntax seems to no longer work in 0.10/master HOT 3
- How to spec classes that contain class which shadow top-level primitives? HOT 4
- How to mock/stub IO::Memory#gets HOT 8
- Noticed line/column skew during incremental porting of RSpec files over to Spectator HOT 1
- Add RSpec's stub_const
- Better error when attempting to use string interpolation in it descriptions? HOT 11
- Problem with mock when using abstract class HOT 7
- Stubbed methods with default arguments not working HOT 3
- Mock not working for Process.run with block. HOT 10
- Runner filter -e tests equality instead of inclusion
- Example of custom matcher does not compile HOT 1
- Usage of keyword arguments as positional arguments in stubs HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spectator.