<whitequark>
r0bgleeson: it's not just about expect() and friends
<gnufied>
lets hear it
igalic has quit [Changing host]
igalic has joined #ruby-lang
<yorickpeterse>
r0bgleeson: because now I have to move an "expensive" operation to a before { } block
<r0bgleeson>
whitequark: I was referring to the mention of minitest
<yorickpeterse>
so it runs every darn time, which is not needed at all
<whitequark>
it's how rspec feels a need to reinvent practically everything ruby has, from inheritance to method definition
<gnufied>
I personally feel debating virtues of unit testing frameworks is waste of time. they are all pretty much same.
<whitequark>
for example the hoops you need to jump through to define a matched are ridiculous
<yorickpeterse>
oh, I use none of that crap
<yorickpeterse>
I just use ye olde methods
<whitequark>
*a matcher
<yorickpeterse>
Was a fan of Bacon but it's output was confusing most of the time
<yorickpeterse>
* its
<whitequark>
all huge frameworks tend to do this, but rspec doesn't *need* to be huge
<r0bgleeson>
i've seen some things I don't like (like "shared contexts") but matchers are usually pretty cool
<r0bgleeson>
i havent written my own though
<whitequark>
yeah, can you say how to write one from memory? last time I spent half a hour or so figuring it out
<r0bgleeson>
i use test-unit in my personal projects, and rspec or something like it everywhere else
jxie has joined #ruby-lang
breakingthings has joined #ruby-lang
<whitequark>
`def assert_foo(bar)` in minitest.
<r0bgleeson>
come on :)
<r0bgleeson>
not exactly fair
<yorickpeterse>
why not?
<yorickpeterse>
I'd say that's perfectly fair
<whitequark>
it's not even debating some fine details of architecture, I just hate to use rspec because it makes me feel dumb
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<whitequark>
without a good reason
<r0bgleeson>
sure, it works, but rspec is a little bit more creative than that. imagine a predicate like tired?, you could say, subject.should be_tired.
<whitequark>
assert subject.tired?
<r0bgleeson>
yeah, sure.
* yorickpeterse
popcorn
<gnufied>
^ exactly!
<gnufied>
:-)
<r0bgleeson>
you could be that simple.
shinnya has joined #ruby-lang
<r0bgleeson>
i don't see what minitest is so great for if you're using test-unit style assertions though
<gnufied>
there are some good things admittedly
hahuang61 has joined #ruby-lang
<gnufied>
the whole example thing for reusing specs is gross in rspec
<yorickpeterse>
(ssssh don't tell anybody that test-unit uses minitest)
<gnufied>
too many moving pieces
<r0bgleeson>
yorickpeterse: no it doesn't.
<r0bgleeson>
yorickpeterse: that hasn't been true for a while.
<gnufied>
sure it reads better, but it is not intuitive
<gnufied>
anyways, I personally don't have problems with rspec. it is just community has adopted certain practices which I think are needlessly complicated
<gnufied>
what could have been solved by ruby, we are throwing DSLs at it
<gnufied>
shared_examples, shared_contexts etc
<gnufied>
let, let!, subject,
<r0bgleeson>
yeah i dont like that "use_context" stuff too much
<r0bgleeson>
subject can be okay
<r0bgleeson>
because it can become an implicit self
<r0bgleeson>
so you can say { should be_tired }
<r0bgleeson>
it { should be_tired } rather.
<gnufied>
ruby has modules, doesn't it?
<gnufied>
:-)
<yorickpeterse>
I think I have one shared context somewhere
<yorickpeterse>
it adds a before :all and after :all block
<yorickpeterse>
it's for some older projects that still rely on database cleaner
<r0bgleeson>
you should rewrite it as a ActiveSupport::Concern with an included() hook.
datanoise has quit [Ping timeout: 246 seconds]
<whitequark>
wow, and I just went for a phone call
datanoise has joined #ruby-lang
nXqd has joined #ruby-lang
<yorickpeterse>
whitequark: you have phones in Russia?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
unrealhoang has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<r0bgleeson>
whenever i find myself using flatten() it's usually because i'm doing something weird somewhere else.
daikan has joined #ruby-lang
<whitequark>
yes
datanoise has joined #ruby-lang
Johz has joined #ruby-lang
DouweM has joined #ruby-lang
fire has quit [Quit: WeeChat 0.4.1]
datanoise has quit [Ping timeout: 245 seconds]
mechanicles has joined #ruby-lang
<mechanicles>
Hi all
<bougyman>
harro
<mechanicles>
I want to parse comma separated values using regex...anybody knows good reqgex example?
<r0bgleeson>
why would you use a regexp and not the 'CSV' library?
<yorickpeterse>
mechanicles: Yes
<yorickpeterse>
mechanicles: require 'csv'
<mechanicles>
We had problems with the encoding...there are some rows which have different encoding style and some have another encoding styles
<r0bgleeson>
treat them as ASCII-8BIT then?
<rsl>
mechanicles: you can rescue inside each row and/or handle that per row. i can't imagine a regex is gonna solve that but make it more complicated.
<r0bgleeson>
you probably aren't going to get far with a regexp
<yorickpeterse>
If regexps are your solution to encoding you're....well...lost
<r0bgleeson>
mechanicles: you can read the file as 'ASCII-8BIT', which is the byte encoding you were use to on 1.8
<r0bgleeson>
you shouldn't run into any transcode errors then
snsei has joined #ruby-lang
<mechanicles>
r0bgleeson: let me check
datanoise has joined #ruby-lang
<r0bgleeson>
that means you have a string of bytes though..
<r0bgleeson>
just be aware of that
BubonicPestilenc has joined #ruby-lang
kaiza has joined #ruby-lang
deol has joined #ruby-lang
datanoise has quit [Ping timeout: 272 seconds]
deol has quit [Ping timeout: 252 seconds]
fire has joined #ruby-lang
fire is now known as Guest93338
rippa has joined #ruby-lang
Guest93338 has quit [Remote host closed the connection]
megha has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
rippa has quit [Ping timeout: 248 seconds]
daikan has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
snsei has quit [Remote host closed the connection]
daikan has joined #ruby-lang
elia has joined #ruby-lang
ylluminate` has joined #ruby-lang
daikan has quit [Ping timeout: 246 seconds]
cbreeze has quit [Quit: cbreeze]
ylluminate` has quit [Ping timeout: 240 seconds]
ylluminate has quit [Ping timeout: 246 seconds]
kaiza has quit [Ping timeout: 260 seconds]
datanoise has joined #ruby-lang
relix has joined #ruby-lang
snsei has joined #ruby-lang
RobertBirnie has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
relix has quit [Ping timeout: 272 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
snsei has joined #ruby-lang
ozkan has quit [Quit: Leaving...]
ender has joined #ruby-lang
ender_ has joined #ruby-lang
RobertBirnie has joined #ruby-lang
ender has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Client Quit]
serroft has joined #ruby-lang
wuhua has quit [Remote host closed the connection]
wuhua has joined #ruby-lang
deol has joined #ruby-lang
snsei has quit [Remote host closed the connection]
ender_ has quit [Ping timeout: 240 seconds]
deol has quit [Ping timeout: 272 seconds]
__butch__ has joined #ruby-lang
supfoo has quit [Ping timeout: 246 seconds]
CaptainJet has joined #ruby-lang
mechanicles has quit [Remote host closed the connection]
supfoo has joined #ruby-lang
relix has joined #ruby-lang
kaiza has joined #ruby-lang
daikan has joined #ruby-lang
datanoise has joined #ruby-lang
mechanicles has joined #ruby-lang
daikan has quit [Ping timeout: 246 seconds]
relix has quit [Ping timeout: 252 seconds]
seanlinsley has quit [Quit: seanlinsley]
shinnya has quit [Ping timeout: 246 seconds]
datanoise has quit [Ping timeout: 240 seconds]
jmaya has joined #ruby-lang
seanlinsley has joined #ruby-lang
datanoise has joined #ruby-lang
RobertBirnie has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
jmaya has quit [Client Quit]
robbyoconnor has joined #ruby-lang
ozkan has joined #ruby-lang
lewix has joined #ruby-lang
megha has quit [Quit: WeeChat 0.4.1]
lewix has quit [Remote host closed the connection]
cbreeze has joined #ruby-lang
ozkan has quit [Ping timeout: 246 seconds]
GBrawl has quit [Quit: Computer has gone to sleep.]
symm- has joined #ruby-lang
GBrawl has joined #ruby-lang
GBrawl has quit [Ping timeout: 252 seconds]
deol has joined #ruby-lang
wuhua has quit [Ping timeout: 272 seconds]
mannyt has joined #ruby-lang
kirin` has quit [Ping timeout: 252 seconds]
kirin` has joined #ruby-lang
mbj has joined #ruby-lang
fire has joined #ruby-lang
snarfmason has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
robbyoconnor has quit [Excess Flood]
uta has joined #ruby-lang
robbyoconnor has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 0.4.2]
havenwood has joined #ruby-lang
mbj has joined #ruby-lang
ulisescab has quit []
vpretzel has quit [Quit: Adios!]
mbj has quit [Read error: Connection reset by peer]
elia has quit [Quit: Computer has gone to sleep.]
mbj has joined #ruby-lang
snsei has joined #ruby-lang
elia has joined #ruby-lang
anulman has joined #ruby-lang
mbj has quit [Read error: Connection reset by peer]
cbreeze has quit [Quit: cbreeze]
ylluminate has joined #ruby-lang
daikan has joined #ruby-lang
r0bgleeson has quit [Ping timeout: 245 seconds]
mbj has joined #ruby-lang
daikan has quit [Ping timeout: 252 seconds]
|jemc| has joined #ruby-lang
anulman has quit [Ping timeout: 272 seconds]
serroft has quit [Quit: Leaving.]
GBrawl has joined #ruby-lang
elia has quit [Quit: Computer has gone to sleep.]
ozkan has joined #ruby-lang
GBrawl has quit [Ping timeout: 272 seconds]
GBrawl has joined #ruby-lang
ozkan has quit [Ping timeout: 246 seconds]
snsei has quit [Remote host closed the connection]
tahzeem has quit [Ping timeout: 246 seconds]
mannyt has quit []
h0rrorvacui has joined #ruby-lang
kaiza has quit [Read error: Connection reset by peer]
yours_truly has quit [Quit: Leaving]
nisstyre has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
mbj has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby-lang
|jemc| has quit [Ping timeout: 246 seconds]
datanoise has quit [Ping timeout: 245 seconds]
MaddinXx has joined #ruby-lang
elia has joined #ruby-lang
diegoviola has joined #ruby-lang
fire has quit [Quit: WeeChat 0.4.1]
mbj has joined #ruby-lang
elia has quit [Ping timeout: 240 seconds]
hahuang61 has joined #ruby-lang
jaimef has joined #ruby-lang
daikan has joined #ruby-lang
hahuang61 has quit [Ping timeout: 246 seconds]
daikan has quit [Ping timeout: 245 seconds]
serroft has joined #ruby-lang
Asher1 has joined #ruby-lang
Asher has quit [Ping timeout: 240 seconds]
MaddinXx has quit [Read error: Connection reset by peer]
MaddinXx has joined #ruby-lang
serroft has quit [Ping timeout: 272 seconds]
diegoviola has quit [Quit: WeeChat 0.4.2]
ozkan has joined #ruby-lang
floyd2 has joined #ruby-lang
ozkan has quit [Ping timeout: 272 seconds]
ender_ has joined #ruby-lang
anulman has joined #ruby-lang
kaiza has joined #ruby-lang
ender__ has joined #ruby-lang
snsei has joined #ruby-lang
tahzeem has joined #ruby-lang
robbyoconnor has quit [Excess Flood]
ender_ has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby-lang
ender has joined #ruby-lang
Asher1 has quit [Quit: Leaving.]
Asher has joined #ruby-lang
ender__ has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
ender_ has joined #ruby-lang
Tearan has joined #ruby-lang
snsei has quit [Remote host closed the connection]
ender has quit [Ping timeout: 240 seconds]
h0rrorvacui has quit [Quit: Leaving]
mbj has quit [Read error: Connection reset by peer]
snsei has joined #ruby-lang
dingus_khan has joined #ruby-lang
mbj has joined #ruby-lang
snsei has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby-lang
vlad_starkov has joined #ruby-lang
anulman1 has joined #ruby-lang
anulman has quit [Read error: Connection reset by peer]
wallerdev has joined #ruby-lang
datanoise has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
uta has quit [Remote host closed the connection]
GBrawl has quit [Quit: Computer has gone to sleep.]
GBrawl has joined #ruby-lang
mechanicles has quit [Remote host closed the connection]
mechanicles has joined #ruby-lang
dingus_k_ has joined #ruby-lang
breakingthings has quit []
dingus_khan has quit [Ping timeout: 272 seconds]
datanoise has quit [Ping timeout: 245 seconds]
daikan has joined #ruby-lang
Johz has quit [Quit: Leaving]
vlad_starkov has quit []
daikan has quit [Ping timeout: 272 seconds]
breakingthings has joined #ruby-lang
hashbangchris has joined #ruby-lang
Asher has quit [Quit: Leaving.]
joast has quit [Ping timeout: 260 seconds]
GBrawl has quit [Quit: Computer has gone to sleep.]
datanoise has joined #ruby-lang
GBrawl_ has joined #ruby-lang
GBrawl_ has quit [Read error: Connection reset by peer]
GBrawl__ has joined #ruby-lang
thmzlt has joined #ruby-lang
hashbangchris has quit [Quit: mt]
tahzeem has quit [Ping timeout: 252 seconds]
dingus_k_ has quit [Remote host closed the connection]
|jemc| has joined #ruby-lang
GBrawl__ has quit [Quit: Computer has gone to sleep.]