Comments (19)
Will come! ;) Now, let's see who makes it first!
from rafflers.
Stelian's got 6 hours of meetings today, so advantage is yours, @simicic!
from rafflers.
@simicic you have a small heads up, but the war ain't over!
from rafflers.
haha, then the good news can be that I work as well, maybe someone else can come in!
from rafflers.
There's no rule that says we can't have multiple rafflers in the same language. That would even be fun.
There's also no rule that says a dog can't play basketball.
from rafflers.
File.readlines($1).sample
or
# with error handling ;-)
File.readlines($1).sample if $1
from rafflers.
Seriously though, PR? :) And then no more GIFs for me today, I promise.
from rafflers.
I will leave that for @simicic . She probably wants to write a spec too ;-)
from rafflers.
haha, @janpaul believe it or not, that was my first thought, there should be some tests!! 😄 it seems you know me well...
from rafflers.
@simicic oh I absolutely believe it! I've known you a bit longer than today ;-)
from rafflers.
/me points at #4
from rafflers.
@Stelian here you go ;-)
File.readlines($1).sample if $1 && File.exists?($1)
from rafflers.
oh no! where are the tests @Stelian ?? 😄
from rafflers.
I just ... /me walks away
from rafflers.
@simicic another shorty for you then
describe Raffle do
let(:raffle) { Raffle.new }
it 'should be something sensible' do
allow(File).to receive(:readlines).and_return %w(foobar)
expect(raffle.run).to eq 'foobar'
end
end
from rafflers.
I am sorry @janpaul but this does not guarantee randomness, foobar could be my name ;)
you forgot one should have_received :sample
;)
from rafflers.
@simicic pffft
from rafflers.
Reopening until we have a Ruby raffler with raffler with drama!
from rafflers.
I wonder if I should try... does Ruby have any functions that start with "array_" ?
from rafflers.
Related Issues (12)
- I'm really disappointed HOT 2
- We're missing some languages:
- Rust raffler doesn't compile HOT 1
- Raffle using AGC (Appollo Guidance Control)
- Glitch seems broken? HOT 2
- Only build changed rafflers in CI
- Verify variable types in COBOL raffler
- Relax requirements for test HOT 1
- Build does not always fail when test fails
- Use a build matrix to build and test each raffler separately
- OCD / inconvenience HOT 5
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 rafflers.