Oloryn_lt2 has quit [Read error: Connection reset by peer]
hakunin has quit [Read error: Connection reset by peer]
hakunin_ has joined #ruby-lang
iliketur_ has joined #ruby-lang
hogeo has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 240 seconds]
mistym has quit [Quit: Leaving]
kurko__ has quit [Quit: Computer has gone to sleep.]
mindriot101 has quit [Remote host closed the connection]
robbyoconnor has quit [Quit: Konversation terminated!]
kvs has quit [Ping timeout: 240 seconds]
nisstyre is now known as Nisstyre-laptop
tharindu has joined #ruby-lang
kvs has joined #ruby-lang
Boohbah_ is now known as Boohbah
Nisstyre-laptop is now known as nisstyre
pskosinski has quit [Read error: Connection reset by peer]
segy has quit [Ping timeout: 256 seconds]
segy has joined #ruby-lang
nisstyre is now known as nisstyre-laptop
Lea has quit [Ping timeout: 260 seconds]
thepumpkin has joined #ruby-lang
nisstyre has joined #ruby-lang
jaimef has quit [Excess Flood]
bungoman has joined #ruby-lang
seanlerner has joined #ruby-lang
gregmore_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
jaimef has joined #ruby-lang
mbj has quit [Ping timeout: 245 seconds]
seanlerner has quit [Ping timeout: 260 seconds]
GitNick has joined #ruby-lang
thepumpk_ has joined #ruby-lang
__butch__ has quit [Remote host closed the connection]
nisstyre has quit [Quit: Leaving]
thepumpkin has quit [Ping timeout: 256 seconds]
thepumpk_ has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
bzalasky has joined #ruby-lang
tkuchiki has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
iliketur_ has quit [Quit: zzzzz…..]
brianpWins has quit [Quit: brianpWins]
tomzx_mac has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jaimef has quit [Excess Flood]
jaimef has joined #ruby-lang
tomplast has quit [Read error: Connection reset by peer]
hakunin_ has quit [Read error: Connection reset by peer]
hakunin has joined #ruby-lang
nathanstitt has joined #ruby-lang
tomplast has joined #ruby-lang
machuga|away is now known as machuga
tkuchiki has joined #ruby-lang
akahn has joined #ruby-lang
meise has quit [Ping timeout: 248 seconds]
aef has quit [Ping timeout: 245 seconds]
fenicks has quit [Remote host closed the connection]
iliketur_ has joined #ruby-lang
aef has joined #ruby-lang
meise has joined #ruby-lang
GaelanAintAround is now known as Gaelan
robbyoconnor has joined #ruby-lang
kurko__ has joined #ruby-lang
lsegal has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
kek has quit [Remote host closed the connection]
seanlerner has joined #ruby-lang
robbyoconnor has quit [Quit: Konversation terminated!]
seanlerner has quit [Ping timeout: 260 seconds]
bzalasky has joined #ruby-lang
jsullivandigs has quit [Remote host closed the connection]
jsullivandigs has joined #ruby-lang
vlad_starkov has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 240 seconds]
mdedetrich has joined #ruby-lang
lsegal has quit [Read error: Connection reset by peer]
gja has joined #ruby-lang
lsegal has joined #ruby-lang
joshuawscott has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 276 seconds]
gja has quit [Client Quit]
Coincidental has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
Domon has quit [Read error: Connection reset by peer]
Domon has joined #ruby-lang
egypt has joined #ruby-lang
tharindu has quit [Ping timeout: 245 seconds]
kurko__ has quit [Quit: Computer has gone to sleep.]
bigjiggity has joined #ruby-lang
bigjiggity has quit [Client Quit]
joshuawscott has quit [Quit: Leaving.]
robbyoconnor has joined #ruby-lang
kurko__ has joined #ruby-lang
pr0ton has quit [Ping timeout: 260 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
bungoman has quit [Remote host closed the connection]
mdedetrich has quit [Ping timeout: 276 seconds]
mdedetrich has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
sstrickl has joined #ruby-lang
sstrickl has quit [Changing host]
sstrickl has joined #ruby-lang
symm- has quit [Ping timeout: 276 seconds]
seanlerner has joined #ruby-lang
nisstyre has joined #ruby-lang
ghena1986 has joined #ruby-lang
ghena1986 has left #ruby-lang [#ruby-lang]
seanlerner has quit [Ping timeout: 240 seconds]
julweber_ has joined #ruby-lang
mdedetrich has quit [Ping timeout: 245 seconds]
julweber has quit [Ping timeout: 245 seconds]
mdedetrich has joined #ruby-lang
nneko001__ has quit [Quit: Konversation terminated!]
hahuang65 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Bosox20051 has joined #ruby-lang
rickyrickyrice has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
Gaelan is now known as GaelanAintAround
Cakey has joined #ruby-lang
anteaya has quit [Quit: Leaving]
cads has joined #ruby-lang
GaelanAintAround is now known as Gaelan
sirupsen has joined #ruby-lang
scottschecter has quit [Ping timeout: 245 seconds]
bzalasky has joined #ruby-lang
havenwood has joined #ruby-lang
robbyoconnor has joined #ruby-lang
alexju has joined #ruby-lang
machuga is now known as machuga|away
cads has quit [Ping timeout: 260 seconds]
jsullivandigs has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
gja has joined #ruby-lang
mdedetrich has quit [Ping timeout: 245 seconds]
roadt_ has joined #ruby-lang
gja has quit [Client Quit]
thepumpkin has quit [Remote host closed the connection]
mdedetrich has joined #ruby-lang
mdedetrich has quit [Client Quit]
mdedetrich has joined #ruby-lang
bungoman has joined #ruby-lang
Gaelan is now known as GaelanAintAround
simoz has joined #ruby-lang
cads has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
andrewvos has quit [Ping timeout: 260 seconds]
mdedetrich has quit [Ping timeout: 276 seconds]
havenwood has joined #ruby-lang
andrewvos has joined #ruby-lang
seanlerner has joined #ruby-lang
mdedetrich has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
choi0hun has joined #ruby-lang
seanlerner has quit [Ping timeout: 240 seconds]
shinnya has quit [Ping timeout: 264 seconds]
sstrickl has quit [Quit: sstrickl]
charliesome has joined #ruby-lang
jbsan has quit [Ping timeout: 246 seconds]
lun_ has quit [Remote host closed the connection]
yxhuvud2 has quit [Ping timeout: 256 seconds]
kurko__ has quit [Quit: Computer has gone to sleep.]
seanlerner has joined #ruby-lang
scottschecter has joined #ruby-lang
yxhuvud has joined #ruby-lang
JohnBat26 has joined #ruby-lang
jbsan has joined #ruby-lang
sirupsen has quit [Quit: sirupsen]
tharindu has joined #ruby-lang
days5 has joined #ruby-lang
days5 has left #ruby-lang [#ruby-lang]
daysahead5 has joined #ruby-lang
daysahead5 has quit [Client Quit]
nisstyre-laptop has quit [Quit: Leaving]
jbsan has quit [Ping timeout: 268 seconds]
richardburton has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
mdedetrich has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
richardburton has quit [Ping timeout: 260 seconds]
gja has joined #ruby-lang
gja has joined #ruby-lang
bungoman has quit [Remote host closed the connection]
robbyoconnor has joined #ruby-lang
richardburton has joined #ruby-lang
simoz has quit [Ping timeout: 268 seconds]
jbsan has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
woollyams has joined #ruby-lang
richardburton has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 268 seconds]
wallerdev has quit [Quit: wallerdev]
Plyturon has joined #ruby-lang
wallerdev has joined #ruby-lang
wallerdev has quit [Client Quit]
DavidR_ has joined #ruby-lang
DavidR_ is now known as Guest95211
wallerdev has joined #ruby-lang
joshuawscott has joined #ruby-lang
joshuawscott has quit [Client Quit]
Coincide_ has joined #ruby-lang
drollwit has joined #ruby-lang
nofxx has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby-lang
Guest95211 has left #ruby-lang [#ruby-lang]
nofxx has joined #ruby-lang
dmragone has joined #ruby-lang
<dmragone>
hey all. I'm getting started with minitest spec (been doing rspec for a while), and wasn't sure how to do things like stub multiple methods (besides nested blocks). Would love any pointers or useful links. My google-foo is failing me at the moment
<dmragone>
Also, feel free to point me to the right channel if this topic isn't quite right
<erikh>
zenspider's usually in here during some part of the day, but maybe not now
<erikh>
this is a good place to ask normally.
<ericwood>
dmragone: zenspider is the author of minitest
<erikh>
I don't really use the parts of minitest you're using, unfortunately, so I can't answer your question
<dmragone>
no worries - appreciate it nonetheless
<blowmage>
dmragone: can you post some code that shows what you are trying to do?
<blowmage>
(you can ask in #minitest too)
<dmragone>
simple example is a module class method def get(url); RestClient.get url; end
Domon has quit [Remote host closed the connection]
<dmragone>
I dont' want to hit web, so figure easiest thing is to set expectation on RestClient receiving :get
Domon has joined #ruby-lang
<dmragone>
Next step is what happens when I have that get inside another method, want to stub that and perhaps another
<dmragone>
it's nothing crazy, and I'm sure I'll figure it out. Just wasn't sure what the right mini-test way of doing it was
<blowmage>
if you just want to stub, you can redefine the method in the test, or use minitest's `stub`
<blowmage>
i threw that code in a project i'm working on, and forgot to remove that
<dmragone>
ha. nifty. ok, that's a starting place at least
havenwood has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 246 seconds]
<dmragone>
stubbing/mocking is one of those interesting things that rspec seems to do well (or just that I'm too used to). which may or may not be bad for the resulting code
<blowmage>
zenspider could speak to this better, but imo minitest mock assumes a very different role for mocking than is used in rspec
<dmragone>
definitely seems that way
<blowmage>
but it is not an oversight. over-mocking is considered harmful, so i would try to rethink what those mocks are getting you
<blowmage>
(besides coupling your tests to your implementation)
<dmragone>
Yeah, I'm hoping this can help guide me to better code
<blowmage>
my advise:: don't mock unless you absolutely need to
<blowmage>
if you need to override behavior in your test, override an object's method
JoshuaPaling has joined #ruby-lang
<blowmage>
def my_obj.do_it!; 100; end
<blowmage>
advice, even
* blowmage
sighs
<dmragone>
:-)
<drbrain>
↑ I do this all the time
<drbrain>
it's the best kind of stubbing
fedesilv_ has quit [Remote host closed the connection]
<blowmage>
if you really, really want to do more advanced mocking in minitest, like partial mocks, have a look at SimpleMock
<blowmage>
i prefer stubbing over mocking, and i rarely use anything more than `def`
<drbrain>
↑ ditto
<drbrain>
I feel like my design is too fancy if I have to even stub
alexju has quit [Remote host closed the connection]
<drbrain>
fancy -> complicated
<drbrain>
because if it's hard for me to test, how is a user supposed to figure it out?
<blowmage>
for example, if i have something like RestClient in my app, i will create a layer of code that my app depends on that calls RestClient, so it is easier to stub that behavior in my tests
<dmragone>
that's exactly the direction I'm going (or being led, perhaps)
<blowmage>
and that layer will also make it really easy to refactor RestClient to Net::HTTP without changing all of my tests
gja has quit [Quit: This computer has gone to sleep]
<blowmage>
a rule of thumb is only mock things you own
<blowmage>
and i prefer to only mock the boundaries of my app
tharindu has quit [Ping timeout: 264 seconds]
tharindu has joined #ruby-lang
netShadow has quit [Quit: netShadow]
netShadow has joined #ruby-lang
alexju has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
<charliesome>
anyone seen something along the lines of "undefined method `_run_suite' for class `Test::Unit::Runner'" when running testrb under ruby 2.0?
skade has joined #ruby-lang
mistym has joined #ruby-lang
<erikh>
minitest 5?
dc5ala has joined #ruby-lang
Domon has joined #ruby-lang
Plyturon has quit [Ping timeout: 240 seconds]
<blowmage>
charliesome: yeah, is minitest 5 somehow in the mix? test/unit on ruby 2 is built on minitest 4
Cakey has joined #ruby-lang
<charliesome>
yeah bundle exec fixes things
<charliesome>
which is interesting because I have minitest 4.7.0 in my gemfile
<blowmage>
you want to stay on minitest 4 if you want to keep test/unit happy
cstrahan has quit [Ping timeout: 256 seconds]
<erikh>
yeah, but if you don't use bundle exec, the latest gem on your system is activated
<blowmage>
… for ruby 2. i thought i heard the version of test/unit in ruby 2.1 will remove the dependency on minitest
<erikh>
oh wait, rubygems uses gemfiles now
<drbrain>
it can, but not git gems
drollwit has quit [Remote host closed the connection]
<erikh>
what does it do in that case? just ignore the gemfile/
<Boohbah>
there are so many test tools i don't know which one to use
gja has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
<erikh>
minitest is simple enough to start with
<drbrain>
erikh: I think you get an error
<erikh>
some people prefer rspec, but honestly most of them don't use the more advanced features
<drbrain>
I haven't tried it
<erikh>
ah ok
<Boohbah>
i've been using rspec recently with the expect() syntax
antulik-afk is now known as antulik
<blowmage>
night
<erikh>
later.
<Boohbah>
erikh: do you know any good rspec tutorials?
<erikh>
I don't use rspec, sorry
<Boohbah>
oh, what do you use?
<erikh>
I actually really detest the whole spec thing in general
<erikh>
I use Minitest::Unit
antulik is now known as antulik-afk
<Boohbah>
seattlerb huh
<Boohbah>
ruby is big in seattle
<apeiros>
ruby is big in japan
<Boohbah>
heh
<apeiros>
scnr
nneko001__ has joined #ruby-lang
<erikh>
yep, they've fostered a really solid community of open source contributors up there.
Domon has quit [Remote host closed the connection]
<erikh>
I went once, it was pretty fun and I did things
roadt_ has quit [Read error: Connection reset by peer]
<Boohbah>
big in SF too
<erikh>
yeah, I haven't been to the SF meetups yet
<erikh>
I'm in silicon valley
Domon has joined #ruby-lang
<Boohbah>
isn't the bay next to the valley?
<erikh>
yep, to the west and east
<erikh>
well, the ocean is to the west.
<erikh>
where are you located?
roadt_ has joined #ruby-lang
<Boohbah>
seattle
<erikh>
you should definitely go to seattlerb
<erikh>
like, it's really great. if I could deal with rain 9 months a year I would totally be down
tylersmith has quit [Remote host closed the connection]
<eam>
why Minitest::Unit instead of Test::Unit?
<erikh>
eam: the source is significantly cleaner, and it's a lot easier to extend
<eam>
gotcha
<erikh>
M::U is ... about 300 lines of code maybe?
tylersmith has joined #ruby-lang
<eam>
simple is better
<erikh>
maybe more than that. I know it was super tiny before.
<erikh>
it's grown up a bit though.
alexju has quit [Remote host closed the connection]
<drbrain>
less overhead when running, too
<eam>
I am also not an rspec fan, and Test::Unit is much closer to every other module in other languages
<drbrain>
which matters when you run hundreds of thousands of tests/day
<drbrain>
working on RDoc I easily run 100,000 tests/day
<erikh>
eam: you can pretty much switch to M::U without changing anything but class names
<eam>
sweet
<erikh>
and requires, of course.
<erikh>
extending it requires a little more work, but nothing insurmountable
Domon__ has joined #ruby-lang
<drbrain>
(test suite is just over 2000 tests, if I make 8 commits that's 160,000 not counting minitest runs while working on the commit)
<erikh>
if you're comfortable RTFS (and I think you are) and with ruby you should have no problems
Domon has quit [Ping timeout: 245 seconds]
<Boohbah>
drbrain: throw hardware at the problem because it costs too many programmer hours to make something fast :)
<erikh>
usually the problem with rspec is that it's normally in a rails project with something like database_cleaner or some other super-slow i/o problem
<drbrain>
Boohbah: fortunately someone else made it fast for me
<Boohbah>
thus is the beauty of open sores
<erikh>
honestly, rspec's core is scary as hell but it's not horrible to use if you're into the whole spec thing.
<Boohbah>
source*
<eam>
I really, really do not like attempts to "DSL"ify ruby
<erikh>
puppet fan eh?
<eam>
that's much of my rspec beef :)
<eam>
erikh: nope!
<erikh>
chef?
<dmragone>
but that's what ruby's great at!
tylersmith has quit [Ping timeout: 256 seconds]
<erikh>
that's the same deal really
<eam>
erikh: wrote my own (in ruby)
<erikh>
although chef's core is much, much cleaner
<yorickpeterse>
heh, it's good to have an office McGuyver
pskrz has joined #ruby-lang
<yorickpeterse>
never out of nail files, pocket knifes, other tools, etc
symm- has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Ping timeout: 260 seconds]
<maloik>
Our office mcguyvers apparently made some kind of weird loop with some power over ethernet stuff, so they blew out one of the access points :(
<maloik>
shitty internet is even shittier
lfox has quit [Client Quit]
<maloik>
well, wifi i should say
lfox has joined #ruby-lang
<yorickpeterse>
we have fibre...it's 10/10
<yorickpeterse>
lol
<yorickpeterse>
or fiber, one of the two
<yorickpeterse>
over here I think I'm the only one who actually somewhat knows how the network hardware works (interbutts provider takes care of managing it)
<yorickpeterse>
and even then I'm just like "Let's pull some cables here, put stuff in there, lets see what happens!"
gja has quit [Quit: This computer has gone to sleep]
iliketur_ has joined #ruby-lang
gja has joined #ruby-lang
gja has joined #ruby-lang
gja has quit [Changing host]
Scader has joined #ruby-lang
julweber has joined #ruby-lang
x0f_ has joined #ruby-lang
kek_ has quit [Ping timeout: 248 seconds]
benanne has joined #ruby-lang
<erikh>
yorickpeterse: pong
rippa has joined #ruby-lang
x0F has quit [Ping timeout: 260 seconds]
hahuang65 has joined #ruby-lang
wnd_ has left #ruby-lang [#ruby-lang]
wnd has joined #ruby-lang
Gillo has joined #ruby-lang
stevechiagozie has quit [Ping timeout: 256 seconds]
<wnd>
I'm getting tired of this "Cannot change nickname while banned on channel" after some (freenode) network problems
<yorickpeterse>
erikh: so you're a deployment god right? I'm looking for a storage engine that would let me store application names and the servers/versions they run on, would you happen to know of any decent ones (Mongo is not an answer)? Redis would be an option but I'd have to come up with some clever key names to make that work
<drbrain>
wnd: it keeps the spammers out, you can register your alternate nick with your primary nick through nickserv
<yorickpeterse>
another option is simpledb since we already drank the AWS koolaid, but I don't like SimpleDB
<yorickpeterse>
basically this list of servers would only contain up to date ones, not something that was running 5 months ago (thus it also needs some kind of expiration system)
julweber has quit [Ping timeout: 240 seconds]
<wnd>
drbrain, Oh, thanks. I'd better have a little chat with nickserv.
<drbrain>
wnd: at least, I'm guessing that it will fix the problem for you
<wnd>
sounds like it would
<erikh>
yorickpeterse: does it have to be distributed?
<erikh>
like, couldn't you just do that on the filesystem?
stevechiagozie has joined #ruby-lang
<yorickpeterse>
erikh: yes, because it will be requested from multiple clients (a single server, CLI client, etc)
<yorickpeterse>
well distributed, it would have to be network available
axsuul has joined #ruby-lang
<erikh>
zookeeper imo
<yorickpeterse>
I was about to ask that heh
<erikh>
I'm actually working on a new deployment system that uses it.
<erikh>
hoping to release it when it's done, but probably not until january
<erikh>
Q4 is a very important time for the company, don't want to mess with working systesm
wnd is now known as wnd_
<yorickpeterse>
Basically the process would be: Jenkins builds package, shits it on S3 -> triggers some kind of deploy notification -> servers update themselves -> notify central service of results
wnd_ is now known as wnd
<yorickpeterse>
and a basic Sinatra interface would be slapped on top of that
<yorickpeterse>
(so we can see the results)
<erikh>
yeah, deploy notifications are good
<erikh>
you can also do ephemeral locks to orchestrate rolling restarts
<erikh>
which is what I'm working on
<erikh>
zookeeper is ... complicated and very founded in concurrency pattenrs
<yorickpeterse>
hm, that too is something I'd need for our web frontends, the rest can jus tbe killed in one go