havenwood changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.2.1, 3.1.3, 3.0.5, 2.7.7: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://t.ly/9ua4 | Logs: https://libera.irclog.whitequark.org/ruby/
nirvdrum has joined #ruby
sickdyd has joined #ruby
<sickdyd> I'm writing some tests for my ror app, but apparently I cannot use the "describe" keyword
<sickdyd> ruby '3.1.3'
<sickdyd> is it something that was introduced later on?
nirvdrum has quit [Quit: nirvdrum]
<adam12> sickdyd: That's part of RSpec, a 3rd party library.
<adam12> Actually, you can use it in Minitest too, but I am not sure how in Rails. Show us what you're working with.
<adam12> (tho I'm bailing for the night so maybe someone else can help)
<sickdyd> adam12: thanks, I will look into it
<sickdyd> capibara, selenium-webdriver and webdrivers
<weaksauc_> are you using rspec / requiring it correctly?
<sickdyd> should that be in the Gemlist file?
<sickdyd> I tried requiring it, but I got an error
<sickdyd> this is an old work repo I have to add some tests to, but I didn't do much work with ror tbh
<weaksauc_> yeah it's a gem that would be in the GEMFILE
markong has quit [Ping timeout: 265 seconds]
<sickdyd> weaksauc_: it's not there, but I am already running some tests
<weaksauc_> what gems are listed? minitest?
<sickdyd> is it something built in ror?
<sickdyd> there's a bunch, but I cannot see minitest either
<weaksauc_> what do you have under the test group
<sickdyd> capibara, selenium-webdriver and webdrivers
nirvdrum has joined #ruby
<weaksauc_> rails does include some testing out of the box
<sickdyd> I see, that's probably what I'm using now
<sickdyd> right now I'm just writing some unit tests for a helper
<sickdyd> but I want to test the view too
<weaksauc_> which rails version?
<sickdyd> like getting elements and verify that they work as expected
<sickdyd> rails 6.1.7.1
<sickdyd> I suppose I have to use capibara for that
nirvdrum has quit [Client Quit]
<weaksauc_> depends on the level of testing you are planning on doing
<weaksauc_> if you are just testing the generation of the webpage you'd not need it
<weaksauc_> html is all text in the end
<sickdyd> I would like to test some js as well
<weaksauc_> using jest?
<weaksauc_> or the like
wk_ has quit [Ping timeout: 246 seconds]
<sickdyd> stupid question: how do I check if a value is not nil and greater than zero? is there a shortcut?
<sickdyd> something&.foo&.bar_value > 0 does not work
<sickdyd> I thought it would short circuit to false
<sickdyd> do I have to split it or there's some magic I am missing?
<weaksauc_> foo && foo > 0
<sickdyd> right, I was hoping to skip a check :> but thanks
wk_ has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
wk_ has quit [Read error: Connection reset by peer]
<sphex> sickdyd: foo&.positive?
<sphex> #positive? and #negative? both exclude zero
victori has quit [Quit: ZNC 1.8.2 - https://znc.in]
dmn has quit [Ping timeout: 260 seconds]
victori has joined #ruby
nirvdrum has joined #ruby
caedmon has joined #ruby
caedmon has quit [Read error: Connection reset by peer]
razetime has joined #ruby
Goodbye_Vincent6 has joined #ruby
Goodbye_Vincent has quit [Ping timeout: 276 seconds]
Goodbye_Vincent6 is now known as Goodbye_Vincent
helge has quit [Ping timeout: 252 seconds]
helge has joined #ruby
wk has joined #ruby
sagax has joined #ruby
sagax has quit [Changing host]
sagax has joined #ruby
jhass has quit [Ping timeout: 250 seconds]
jhass has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
cognemo has quit [Ping timeout: 260 seconds]
<havenwood> sickdyd: +1 to sphex's suggestion, that seems ideal. Or depending on how permissive you want to be you can: foo.to_i.positive?
<havenwood> I don't mind the falsey `nil` that `foo&.positive?` can result in, and it's the idiomatic Ruby style. You could consider prefixing it with `!!` if you actually need `true` or `false` or the `to_i` results in bool as well.
Linux_Kerio has joined #ruby
<sickdyd> sphex, havenwood: thanks for the suggestion, I will look it up
<sickdyd> anyway I ended up removing the related method since it turned out to be duplicated
ur5us_ has quit [Ping timeout: 246 seconds]
moldorcoder7 has quit [Ping timeout: 264 seconds]
stirl has joined #ruby
grenierm has joined #ruby
nirvdrum has joined #ruby
sidetracking has joined #ruby
dviola has quit [Ping timeout: 265 seconds]
reset has quit [Quit: reset]
dmn has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
howdoi has joined #ruby
crespire1 has quit [Ping timeout: 255 seconds]
stirl has quit [Ping timeout: 250 seconds]
crespire has joined #ruby
John_Ivan has quit [Ping timeout: 265 seconds]
razetime has quit [Ping timeout: 255 seconds]
nirvdrum has joined #ruby
nirvdrum has quit [Quit: nirvdrum]
nirvdrum has joined #ruby
tomtmym has joined #ruby
tomtmym has quit [Changing host]
tomtmym has joined #ruby
nirvdrum has quit [Client Quit]
cardis32 has joined #ruby
wk has quit [Ping timeout: 276 seconds]
hypoki43 has joined #ruby
crespire has quit [Killed (NickServ (GHOST command used by crespire1))]
crespire1 has joined #ruby
cardis32 has quit [Ping timeout: 252 seconds]
MalusVulgaris has joined #ruby
teclator has joined #ruby
hypoki43 has quit [Ping timeout: 252 seconds]
wk has joined #ruby
sidetracking has quit [Quit: Client closed]
_ht has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
razetime has joined #ruby
jvalleroy has joined #ruby
dionysus69 has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
grenierm has quit [Ping timeout: 260 seconds]
crespire1 has quit [Ping timeout: 276 seconds]
crespire has joined #ruby
rvalue has quit [Ping timeout: 250 seconds]
razetime has quit [Quit: See You Space Cowboy]
rvalue has joined #ruby
wk has quit [Ping timeout: 246 seconds]
otisolsen70 has joined #ruby
wk has joined #ruby
MalusVulgaris has quit [Ping timeout: 252 seconds]
soaper35 has joined #ruby
infinityfye has joined #ruby
desnudopenguino has quit [Read error: Connection reset by peer]
desnudopenguino has joined #ruby
gemmaro has joined #ruby
MalusVulgaris has joined #ruby
desnudopenguino1 has joined #ruby
desnudopenguino has quit [Ping timeout: 246 seconds]
desnudopenguino1 is now known as desnudopenguino
mexen has joined #ruby
gemmaro has quit [Remote host closed the connection]
soaper35 has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
jmcgnh has quit [Ping timeout: 256 seconds]
jmcgnh has joined #ruby
John_Ivan has joined #ruby
jmcgnh has quit [Ping timeout: 250 seconds]
Linux_Kerio has quit [Ping timeout: 250 seconds]
moldorcoder7 has joined #ruby
Bish has quit [Ping timeout: 255 seconds]
Sankalp has quit [Ping timeout: 246 seconds]
Sankalp- has joined #ruby
Sankalp- is now known as Sankalp
dionysus69 has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
Bish has joined #ruby
markong has joined #ruby
sickdyd has quit [Ping timeout: 250 seconds]
teclator has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
sickdyd has joined #ruby
sickdyd has quit [Ping timeout: 255 seconds]
cek has joined #ruby
roshanavand has joined #ruby
yardst28 has joined #ruby
RogerHaase has joined #ruby
RogerHaase has left #ruby [#ruby]
TomyWork has joined #ruby
wk has quit [Ping timeout: 276 seconds]
jmcgnh has joined #ruby
sickdyd has joined #ruby
RogerHaase has joined #ruby
sickdyd has quit [Ping timeout: 276 seconds]
summerisle has quit [Quit: No Ping reply in 180 seconds.]
defectiverobot has joined #ruby
summerisle has joined #ruby
defectiverobot has quit [Client Quit]
defectiverobot has joined #ruby
yardst28 has quit [Ping timeout: 246 seconds]
roshanavand has quit [Ping timeout: 276 seconds]
defectiverobot has quit [Ping timeout: 268 seconds]
sickdyd has joined #ruby
defectiverobot has joined #ruby
c10l has quit [Ping timeout: 276 seconds]
MalusVulgaris has quit [Quit: MalusVulgaris]
sickdyd has quit [Ping timeout: 246 seconds]
incava54 has joined #ruby
RogerHaase has left #ruby [#ruby]
dionysus69 has quit [Ping timeout: 250 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
sickdyd has joined #ruby
Linux_Kerio has joined #ruby
sickdyd has quit [Ping timeout: 265 seconds]
defectiverobot has quit [Remote host closed the connection]
wk has joined #ruby
slothby has joined #ruby
incava54 has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
wk has quit [Read error: Connection reset by peer]
reset has joined #ruby
sickdyd has joined #ruby
sickdyd has quit [Ping timeout: 276 seconds]
cek has quit [Quit: Connection closed for inactivity]
John_Ivan has quit [Read error: Connection reset by peer]
sickdyd has joined #ruby
defectiverobot has joined #ruby
sickdyd has quit [Ping timeout: 252 seconds]
dviola has joined #ruby
defectiverobot has quit [Remote host closed the connection]
roshanavand has joined #ruby
c10l has joined #ruby
TomyWork has quit [Remote host closed the connection]
sickdyd has joined #ruby
c10l has quit [Quit: See ya! o/]
John_Ivan has joined #ruby
sickdyd has quit [Ping timeout: 268 seconds]
c10l has joined #ruby
wk has joined #ruby
diploi56 has joined #ruby
mexen has quit []
markong has quit [Ping timeout: 255 seconds]
szkl has joined #ruby
defectiverobot_ has joined #ruby
defectiverobot_ has quit [Remote host closed the connection]
___nick___ has joined #ruby
wk has quit [Ping timeout: 276 seconds]
Linux_Kerio has quit [Quit: Konversation terminated!]
Linux_Kerio has joined #ruby
sickdyd has joined #ruby
sickdyd has quit [Ping timeout: 256 seconds]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
howdoi has joined #ruby
sickdyd has joined #ruby
sickdyd has quit [Ping timeout: 276 seconds]
wk has joined #ruby
<apteryx> hello! I'm trying to run the test suite of ruby-syntax-tree, and I get "LoadError: cannot load such file -- ast"; isn't this module supposed to be provided by Ruby itself?
<adam12> apteryx: How are you running the test suite?
<apteryx> 'rake test'
<adam12> apteryx: What happens when you do `bundle exec rake test`
wk has quit [Ping timeout: 250 seconds]
hightower2 has joined #ruby
<apteryx> uh, unexpected error running 'bundle install'
<apteryx> ah, yes. I need to remember my last special invocation :-)
<apteryx> oh, "Installing ast 2.4.2"
<adam12> apteryx: Yeah. It's a separate gem.
<apteryx> I see. I mistakenly thought it was part of Ruby's core libraries
<adam12> I thought it was part of the syntax tree gem until Iooked.
<apteryx> seems there's a rubocop-ast optional dependency
<apteryx> which is satisfied at test time via the rubocop dev dependency
roshanavand has quit [Ping timeout: 250 seconds]
<apteryx> the 'bundle exec rake test' gives a strange error though: https://paste.debian.net/1274034/
<adam12> apteryx: Yeah, strange.
<adam12> apteryx: Confirm Ruby version?
<apteryx> 2.7.4
ur5us_ has joined #ruby
sickdyd has joined #ruby
<apteryx> by adding rubocop-ast to the Guix package def it can be built now though; so my true problem is solved
<apteryx> there's no 'bundle exec' used while building in Guix, but the check phase has to be moved post install and GEM_PATH augmented with the package's own installation prefix.
sickdyd has quit [Ping timeout: 276 seconds]
diploi56 has quit [Quit: Best CPUs can count to infinity twice without being bugged out by zero division errors or whatnot.]
unirri91 has joined #ruby
unirri91 has quit [Remote host closed the connection]
wk has joined #ruby
Amen43 has joined #ruby
Amen43 has quit [Remote host closed the connection]
supers57 has joined #ruby
_ht has quit [Quit: _ht]
___nick___ has quit [Ping timeout: 265 seconds]
sickdyd has joined #ruby
<apteryx> thanks for your help :-)
sickdyd has quit [Ping timeout: 255 seconds]
superm8 has joined #ruby
jmcgnh has quit [Ping timeout: 246 seconds]
supers57 has quit [Ping timeout: 264 seconds]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
wk has quit [Ping timeout: 248 seconds]
teclator has quit [Ping timeout: 255 seconds]
ur5us_ has quit [Ping timeout: 250 seconds]
<adam12> apteryx: cheers.
jmcgnh has joined #ruby
sickdyd has joined #ruby
Linux_Kerio has quit [Ping timeout: 246 seconds]
otisolsen70 has quit [Quit: Leaving]
infinityfye has quit [Quit: Leaving]
wk_ has joined #ruby
grenierm has joined #ruby
moldorcoder7_ has joined #ruby
moldorcoder7 has quit [Ping timeout: 255 seconds]
tomtmym has quit [Quit: Gone.]
grenierm has quit [Ping timeout: 260 seconds]
jmcgnh has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
jmcgnh has joined #ruby
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
ur5us_ has joined #ruby
grenierm has joined #ruby
axsuul has quit [Quit: 👋]
axsuul has joined #ruby
quazimodo has joined #ruby
superm8 has quit [Ping timeout: 246 seconds]
grenierm has quit [Ping timeout: 260 seconds]
dmn has quit [Ping timeout: 260 seconds]