argoneus

Activity Graph

Page 1 of 5 | Next »

2018-10-31

[00:26:13] argoneus: Remote host closed the connection
[00:32:35] argoneus: has joined #RubyOnRails
[00:32:35] argoneus: has joined #ruby

2018-10-09

[06:08:42] argoneus: Ping timeout: 252 seconds
[06:10:17] argoneus: has joined #RubyOnRails
[06:10:17] argoneus: has joined #ruby

2018-10-03

[07:20:21] argoneus: *.net *.split
[07:32:45] argoneus: has joined #RubyOnRails
[07:32:46] argoneus: has joined #ruby
[08:13:57] argoneus: *.net *.split
[08:27:16] argoneus: has joined #RubyOnRails
[08:27:17] argoneus: has joined #ruby
[08:51:31] argoneus: *.net *.split
[09:05:08] argoneus: has joined #RubyOnRails
[09:05:09] argoneus: has joined #ruby

2018-09-11

[13:57:38] argoneus: Quit: No Ping reply in 180 seconds.
[13:58:46] argoneus: has joined #ruby
[13:58:47] argoneus: has joined #RubyOnRails
[14:17:19] argoneus: Quit: No Ping reply in 180 seconds.
[14:18:26] argoneus: has joined #ruby
[14:18:27] argoneus: has joined #RubyOnRails
[14:52:28] argoneus: Quit: No Ping reply in 180 seconds.
[14:53:37] argoneus: has joined #RubyOnRails
[14:53:37] argoneus: has joined #ruby
[15:10:08] argoneus: Quit: No Ping reply in 180 seconds.
[15:11:16] argoneus: has joined #RubyOnRails
[15:11:16] argoneus: has joined #ruby
[15:22:19] argoneus: Quit: No Ping reply in 180 seconds.
[15:23:26] argoneus: has joined #RubyOnRails
[15:23:26] argoneus: has joined #ruby

2018-09-07

[12:48:21] argoneus: Quit: No Ping reply in 180 seconds.
[12:49:29] argoneus: has joined #ruby
[12:49:30] argoneus: has joined #RubyOnRails

2018-09-06

[01:27:11] argoneus: Quit: No Ping reply in 180 seconds.
[01:28:19] argoneus: has joined #ruby
[01:28:20] argoneus: has joined #RubyOnRails

2018-08-21

[20:19:28] argoneus: *.net *.split

2018-08-14

[00:57:11] argoneus: *.net *.split
[01:04:28] argoneus: has joined #ruby
[01:04:29] argoneus: has joined #RubyOnRails

2018-08-11

[07:12:16] argoneus: Quit: No Ping reply in 180 seconds.
[07:13:24] argoneus: has joined #RubyOnRails
[07:13:24] argoneus: has joined #ruby

2018-07-31

[10:09:02] argoneus: Quit: No Ping reply in 210 seconds.
[10:11:29] argoneus: has joined #RubyOnRails
[10:11:29] argoneus: has joined #ruby
[13:37:32] argoneus: Ping timeout: 256 seconds
[13:40:39] argoneus: has joined #RubyOnRails
[13:40:39] argoneus: has joined #ruby

2018-07-29

[14:03:10] argoneus: Quit: No Ping reply in 180 seconds.
[14:05:44] argoneus: has joined #RubyOnRails
[14:05:44] argoneus: has joined #ruby
[14:13:15] argoneus: Quit: No Ping reply in 180 seconds.
[14:21:12] argoneus: has joined #RubyOnRails
[14:21:12] argoneus: has joined #ruby

2018-07-28

[21:16:05] argoneus: Quit: No Ping reply in 180 seconds.
[21:21:59] argoneus: has joined #RubyOnRails
[21:21:59] argoneus: has joined #ruby

2018-07-20

[00:07:08] argoneus: *.net *.split
[00:15:27] argoneus: has joined #RubyOnRails
[00:15:44] argoneus: has joined #ruby

2018-06-29

[12:00:04] argoneus: Quit: No Ping reply in 180 seconds.
[12:01:48] argoneus: has joined #RubyOnRails
[12:01:48] argoneus: has joined #ruby
[16:02:08] argoneus: Quit: No Ping reply in 180 seconds.
[16:08:53] argoneus: has joined #RubyOnRails
[16:08:53] argoneus: has joined #ruby
[18:07:45] argoneus: Quit: No Ping reply in 180 seconds.
[18:09:03] argoneus: has joined #RubyOnRails
[18:09:03] argoneus: has joined #ruby

2018-05-29

[02:47:03] argoneus: *.net *.split
[02:47:46] argoneus: has joined #RubyOnRails
[02:48:02] argoneus: has joined #ruby

2018-05-19

[14:43:39] argoneus: Ping timeout: 256 seconds
[14:44:02] argoneus: has joined #RubyOnRails
[14:44:02] argoneus: has joined #ruby

2018-05-18

[15:06:16] argoneus: Quit: No Ping reply in 180 seconds.
[15:08:47] argoneus: has joined #RubyOnRails
[15:08:47] argoneus: has joined #ruby

2018-05-07

[13:11:10] argoneus: *.net *.split

2018-04-25

[12:26:05] argoneus: *.net *.split
[12:27:29] argoneus: has joined #ruby
[12:27:36] argoneus: has joined #RubyOnRails
[15:01:36] argoneus: *.net *.split
[15:03:08] argoneus: has joined #RubyOnRails
[15:03:32] argoneus: has joined #ruby

2018-03-28

[06:13:26] argoneus: Quit: No Ping reply in 180 seconds.
[06:15:27] argoneus: has joined #RubyOnRails
[06:15:27] argoneus: has joined #ruby
[15:24:16] argoneus: Quit: No Ping reply in 180 seconds.
[15:27:39] argoneus: has joined #RubyOnRails
[15:27:39] argoneus: has joined #ruby
[17:29:56] argoneus: Quit: No Ping reply in 180 seconds.
[17:34:05] argoneus: has joined #RubyOnRails
[17:34:05] argoneus: has joined #ruby

2018-02-25

[09:34:49] argoneus: *.net *.split
[09:36:31] argoneus: has joined #ruby
[09:36:32] argoneus: has joined #RubyOnRails

2018-01-20

[22:59:55] argoneus: Quit: No Ping reply in 180 seconds.
[23:01:03] argoneus: has joined #ruby
[23:01:04] argoneus: has joined #RubyOnRails

2018-01-09

[11:08:05] argoneus: Quit: No Ping reply in 180 seconds.
[11:09:23] argoneus: has joined #RubyOnRails
[11:09:23] argoneus: has joined #ruby

2018-01-06

[23:27:46] argoneus: Ping timeout: 272 seconds
[23:31:13] argoneus: has joined #ruby
[23:31:14] argoneus: has joined #RubyOnRails

2017-12-21

[02:07:17] argoneus: *.net *.split

2017-12-01

[02:28:59] argoneus: has joined #ruby

2017-11-29

[13:10:45] argoneus: (Can I ask about rspec/factorygirl here or is this strictly for rails?)
[13:23:30] argoneus: so, I'm using rails and factorygirl+rspec for testing, but I'm getting this error: DETAIL: Key (char_as_id)=(0) is not present in table "characters".
[13:23:36] argoneus: actually this'll be better to put in a paste, 1 sec
[13:26:54] argoneus: https://gist.github.com/argoneuscze/d6f5cd433b4b71636deee63ca7737638
[13:27:07] argoneus: oh, okay, 1 sec
[13:27:58] argoneus: you can add multiple files to gist, I had no idea, I apologize!
[13:28:01] argoneus: should I re-do it?
[13:28:25] argoneus: doing that atm
[13:29:11] argoneus: I updated it
[13:30:32] argoneus: I'll just split it properly into files, 1 sec
[13:31:16] argoneus: the problem I assumed was happening was that my Characters were somehow getting removed before the Matchup was created
[13:31:26] argoneus: but I had/have no idea how, 1 sec let me update the spec
[13:32:22] argoneus: updated https://gist.github.com/argoneuscze/d6f5cd433b4b71636deee63ca7737638#file-matchup_spec-rb
[13:33:42] argoneus: as for the fixtures, so I can remove that entire block in rails_helper?
[13:34:26] argoneus: oh, I see, I'm new to rails and I saw most reference projects/tutorials using it
[13:34:35] argoneus: thought it was a must have
[13:34:48] argoneus: (I assume its functionality was added into Rails?)
[13:36:31] argoneus: https://gist.github.com/argoneuscze/d6f5cd433b4b71636deee63ca7737638#file-rspec_output-txt
[13:37:57] argoneus: also, reading some stuff, it seems Rails does what database_cleaner does out of the box, interesting, I didn't know that, thanks! (but the problem persists :()
[13:38:55] argoneus: hm, that is the entire input
[13:39:02] argoneus: but when I comment out the line "it { is_expected.to validate_uniqueness_of(:char_as_id).scoped_to(:char_against_id) }", it doesn't break anymore
[13:39:36] argoneus: I'm using RubyMine, let me try from console
[13:40:28] argoneus: oh, you're right, when I run it from console I get another message
[13:40:36] argoneus: "1) Matchup validations should validate that :char_as_id is case-sensitively unique within the scope of :char_against_id"
[13:42:03] argoneus: https://gist.github.com/argoneuscze/d6f5cd433b4b71636deee63ca7737638#file-rspec_output_large-txt
[13:42:58] argoneus: I'd assumed that was some FactoryBot magic, because in another model it seems to work just fine with the foreign key (ie. it creates the foreign object)
[13:43:12] argoneus: Rails in general seems to be very harry potter to me at the moment
[13:44:53] argoneus: I'm not even sure if I'm approaching this correctly
[13:45:10] argoneus: I just want to make sure that no two matchups are in the database twice, but at the same time char X vs char Y is distinct from char Y vs char X
[13:45:20] argoneus: thought that's what the scoped uniqueness is for
[13:46:16] argoneus: do you think I should drop the shoulda matchers entirely or just that one statement?
[13:46:57] argoneus: sorry for this stupid question, but could you somehow tl;dr me on what this bug is / what's causing it?
[13:47:16] argoneus: since I thought it meant the object wasn't being created, but suddenly it is being created because it works in the other statements
[13:47:25] argoneus: so I have no idea what the error message means
[13:50:15] argoneus: hm, that error seems different from mine, though
[13:51:09] argoneus: can I ask what's wrong with it? because I've been kind of relying on it until now and rewriting everything into normal rspec would probably take me a bit
[13:51:22] argoneus: and I'm willing to do it to learn more things about rspec, but... yeah
[13:52:15] argoneus: no, no, I meant shoulda-matchers in general
[13:52:21] argoneus: you mentioned you prefer not to use it at all
[13:53:26] argoneus: ah, I always thought it was a Ruby philosophy to abstract things ad infinitum
[13:54:21] argoneus: truth be told, I haven't really used raw rspec yet, so this might be a good opportunity - I assume I need to create a Matchup object, two distinct Character objects and then try to create a duplicate record?
[13:54:25] argoneus: and that's it
[13:58:57] argoneus: hmm... I assume that means FactoryBot is not needed either
[13:59:09] argoneus: since that should only give me records that are acceptable
[13:59:45] argoneus: now that I think about it, I don't really know how FactoryBot works either, I hate myself for using this magic stuff now :(
[14:00:39] argoneus: oh, like that
[14:00:52] argoneus: I don't even need a DB to run these tests
[14:01:46] argoneus: I just don't confirm any transactions, then
[14:02:17] argoneus: but thanks for the help, I'm going to re-write all my tests by hand for now
[14:05:17] argoneus: since I'm using the transactional approach
[14:05:23] argoneus: any and all items I create during a test will be rolled back after it?
[14:06:26] argoneus: and instead of FactoryBot
[14:06:31] argoneus: I can just make my own fixtures in spec/fixtures?
[14:07:00] argoneus: since it's essentially sample data
[14:07:32] argoneus: right, I meant when I'm e.g. writing Controller tests
[14:07:36] argoneus: I should probably try to write those by hand too
[14:07:38] argoneus: at first at least
[14:08:22] argoneus: (is it just me or are most popular tutorials garbage?)
[14:08:25] argoneus: (apparently)
[14:08:55] argoneus: well, I've been trying to make a REST API for a website frontend
[14:09:05] argoneus: and I decided to do it "properly" with tests etc.
[14:09:39] argoneus: (btw, do you use FactoryGir-- FactoryBot?)
[14:10:20] argoneus: so I can get by without all these things, just rspec and fixtures, huh
[14:11:01] argoneus: that's good then, using magic wand libraries was daunting
[14:11:06] argoneus: I like doing things myself
[14:12:12] argoneus: I'm not saying I'll never use any of these
[14:12:20] argoneus: but for now I'll try to write the project from ground up myself
[14:12:40] argoneus: (well I'm already using Rails, so it's not very ground-up)
[14:13:54] argoneus: anyway, could you give me a quick overview on what you meant by controller tests being deprecated?
[14:14:12] argoneus: e.g. if I want to test that an endpoint /character/:id responds correctly and verifies auth, how would you test it?
[14:16:04] argoneus: so I still test the controller, but not the innards, just as a black box
[14:16:09] argoneus: I'll skim through it
[14:18:07] argoneus: this is making my head hurt
[14:21:54] argoneus: also dminuoso thanks a lot for all the tips, you've been a great help
[16:32:53] argoneus: I'm trying to figure out how to use RSpec to write request specs, but... once again it seems like pure magic to me
[16:33:02] argoneus: e.g. the first code example from this site: http://matthewlehner.net/rails-api-testing-guidelines/
[16:33:08] argoneus: I have no clue where "response" came from
[16:33:30] argoneus: what am I missing here?
[16:33:54] argoneus: and how are the FactoryGirl messages even propagated to the request/response?
[16:34:04] argoneus: it just creates a list and that's it
[16:37:09] argoneus: oki, I added it to the gemfile
[16:37:15] argoneus: hmm, I require rails_helper to get access to some things
[16:38:02] argoneus: requires a bunch of other rails files, and configures rspec
[16:38:30] argoneus: rspec/rails seems relevant
[16:39:08] argoneus: and rspec/rails .... includes like 15 other files again
[16:43:15] argoneus: so every file that wants to test using rspec-rails has to require rails_helper
[16:43:31] argoneus: otherwise I get just "vanilla" rspec
[16:47:46] argoneus: that's pretty clever
[16:49:45] argoneus: so basically
[16:49:49] argoneus: my tests have access
[16:49:58] argoneus: to pretty much the entire application, so I can seemingly pull magic keywords out of nowhere
[16:51:03] argoneus: so what's happening in that code snippet
[16:51:40] argoneus: is that FactoryGirl creates a bunch of messages and populates the test database with it, then I do a get request, which does <internal rails magic> and then I can use helper functions like "response" to get access to the most recent response object
[16:51:44] argoneus: http://matthewlehner.net/rails-api-testing-guidelines/
[16:51:54] argoneus: and test it
[16:52:05] argoneus: and this internal rails magic
[16:52:15] argoneus: includes going through my controllers, in context of the test database
[16:53:16] argoneus: it sets an env var
[16:53:29] argoneus: sets it unless it exists ye
[16:53:56] argoneus: this is making a lot more sense now
[16:54:03] argoneus: right, because those also work with the env var
[16:54:27] argoneus: on one hand I'm happy I understand it a bit more now
[16:54:34] argoneus: but on the other now there's probably 281461824 functions I have no idea about
[16:56:09] argoneus: thanks a lot! this explained a ton
[16:56:23] argoneus: now the last step of my master plan is actually understanding how let/let!/before work
[16:58:46] argoneus: I never actually found this exact site when googling for rspec related issues
[16:58:49] argoneus: but it seems to have a lot of info
[17:01:58] argoneus: thanks once again!

2017-11-28

[11:21:03] argoneus: are there any special requirements to overriding []=? for some reason my program doesn't work as intended and I can't figure out why
[11:24:47] argoneus: my signature is def []=(*args), but for some reason when I do Grid[x] = 5 it doesn't get called at all
[11:26:48] argoneus: any idea why this could be?
[11:28:44] argoneus: oh, I'm an idiot
[11:28:53] argoneus: bla[x][y] is different from bla[x, y]
[11:28:59] argoneus: good to know

2017-11-27

[21:28:23] argoneus: ohhh, I'm an idiot
[21:28:40] argoneus: I'd need to have no_zeroes inside of Enumerable for this to work like that
[21:28:54] argoneus: reading that medium link made me realize