Activity Graph

Page 1 of 2 | Next »


[15:50:27] blowmage: has joined #ruby


[04:25:36] blowmage: Quit: Coyote finally caught me


[21:04:59] blowmage: Ping timeout: 260 seconds
[21:10:04] blowmage: has joined #RubyOnRails
[21:10:04] blowmage: has joined #ruby
[21:15:48] blowmage: Ping timeout: 272 seconds
[21:19:27] blowmage: has joined #ruby
[21:19:28] blowmage: has joined #RubyOnRails
[21:26:51] blowmage: Ping timeout: 250 seconds
[21:30:52] blowmage: has joined #RubyOnRails
[21:30:52] blowmage: has joined #ruby


[15:37:06] blowmage: *.net *.split
[15:41:35] blowmage: has joined #ruby
[15:41:47] blowmage: has joined #RubyOnRails
[15:53:15] blowmage: *.net *.split
[16:47:50] blowmage: has joined #ruby
[16:48:07] blowmage: has joined #RubyOnRails


[18:23:11] blowmage: Ping timeout: 260 seconds
[18:31:30] blowmage: has joined #ruby
[18:31:31] blowmage: has joined #RubyOnRails


[19:01:57] blowmage: *.net *.split
[19:08:07] blowmage: has joined #ruby
[19:08:10] blowmage: has joined #RubyOnRails


[00:08:48] blowmage: has joined #RubyOnRails
[00:08:56] blowmage: has joined #ruby


[01:43:06] blowmage: Ping timeout: 244 seconds
[01:47:04] blowmage: has joined #RubyOnRails
[01:47:04] blowmage: has joined #ruby
[02:42:48] blowmage: Ping timeout: 264 seconds
[02:53:12] blowmage: has joined #RubyOnRails
[02:53:12] blowmage: has joined #ruby


[08:03:50] blowmage: has joined #RubyOnRails
[08:03:50] blowmage: has joined #ruby


[21:38:07] blowmage: Ping timeout: 255 seconds


[20:44:48] blowmage: zero-1: looks like you have some dependency issues. are you sure you have all your dependencies installed?
[20:54:28] blowmage: zero-1: i don't think your problem is test/unit or minitest, i think your dependencies are mixed up. what version of bundler are you using?


[18:09:11] blowmage: has joined #ruby


[15:03:18] blowmage: didek: did you get your answer?
[15:19:58] blowmage:
[15:20:59] blowmage: google, its a thing
[15:21:55] blowmage: i was very close to senging this link instead


[14:38:38] blowmage: Hendrikto: password_digest: <%= BCrypt::Password.create "testpassword" %>
[14:39:31] blowmage: yes, but that doesn't matter
[14:47:59] blowmage: are you sure the fixtures were loaded?
[14:48:05] blowmage: Hendrikto: ^
[14:49:22] blowmage: to make sure, change another value in the fixture and make sure you see the new value in the console
[14:49:31] blowmage: and if that doesn't work i'll remote pair with you
[14:55:49] blowmage: Hendrikto: dunno what to tell you, i use that all the time. for my fixtures i set the password to the same name as the fixture name. users(:bob).authenticate "bob"
[14:56:42] blowmage: Hendrikto: if you are srsly stuck i'll pair with you
[15:12:50] blowmage: Hendrikto: calling .authenticate on the model isn't setting your controller authentication, which is why you are getting redirected
[15:14:35] blowmage: no. what does your app do when your users log in? does it set the user's id in session?
[15:15:58] blowmage: so set session[:user_id] and session[:username] in your test and it should work
[15:17:22] blowmage: also, authorized_user is a boolean, so in your code you should set session[:user_id] =
[15:29:12] blowmage: Hendrikto: you can't set session that way


[17:19:00] blowmage: you can get minitest-matchers and shoulda-matchers to work together


[16:18:19] blowmage: controller tests are great for testing many of the aspects of controllers that are not always tested in integration/acceptance tests. like authentication behavior when not logged in, or accessing resources you don't own.
[16:19:38] blowmage: controllers have several responsibilities, not all of them are universally tested in acceptance tests
[16:20:30] blowmage: chridal: mocks are stubs that are checked to make sure the call to it was made
[16:22:09] blowmage: why controller tests? watch


[21:24:12] blowmage: crankharder: support of the spec dsl, and use of minitest in rails 3
[21:25:11] blowmage: crankharder:


[14:02:46] blowmage: lifez: your model needs to implement the activemodel api to be used in the form helpers
[14:04:38] blowmage: take a look at how this gem works:
[14:04:47] blowmage: or, just use that gem


[17:09:46] blowmage: GeorgesLeYeti:


[17:28:48] blowmage: pskrz: get :index, format: :json
[17:38:11] blowmage: pskrz: assert JSON.parse(response.body)
[17:56:12] blowmage: pskrz: assert_equal Mime::HTML, response.content_type
[17:56:56] blowmage: pskrz: or, if you are using minitest expectations, response.content_type.must_equal Mime::HTML
[18:01:46] blowmage: pskrz: i should blob that blog about testing api controllers using minitest...
[18:13:22] blowmage: pskrz: and


[19:33:10] blowmage: pskrz: what do you need to know about an endpoint to know if it is behaving correctly?
[19:34:14] blowmage: test for that


[19:58:07] blowmage: +1 for railspanel


[22:19:34] blowmage: AntelopeSalad: have you checked out
[22:19:41] blowmage: or
[22:19:47] blowmage: or
[22:20:35] blowmage: how are you running thor?
[22:21:05] blowmage: AntelopeSalad: feel free to switch to #minitest because this doesn't seem directly related to rails


[22:37:33] blowmage: shau-kote_:


[14:36:49] blowmage: Pupeno_w: did you get your answer?
[14:38:19] blowmage: Pupeno_w: what was the issue?
[14:40:23] blowmage: Pupeno_w: join #minitest if you want to discuss further


[22:17:29] blowmage: NBarnes: where is it using MInitest? What does the backtrace say?
[22:18:30] blowmage: what is on that line?
[22:20:35] blowmage: NBarnes: do you have minitest-rails in your Gemfile? Is it in the development and test groups in your Gemfile?


[15:55:38] blowmage: ziikutv: post model


[22:43:25] blowmage: pontiki: write a test and see! :)


[16:51:39] blowmage: ivanoats: are you using minitest-rails?
[16:52:43] blowmage: if you remove the test_unit engine you won't have their rake tasks, and minitest-rails doesn't have a recent task. pull requests appreciated
[17:12:24] blowmage: ivanoats: it looks to be deprecated in rails 4
[17:13:09] blowmage: ivanoats:
[17:15:36] blowmage: ivanoats: i don't love the recent idea though, install autotest and run `autotest` instead. then the tests will run for you any code or test file that changes
[17:17:18] blowmage: workmad3: i've never had much luck with guard, and nobody has contributed a guard config for minitest-rails. autotest config is there and works
[17:26:19] blowmage: ivanoats: i'd love to be back in seattle. maybe someday...


[17:26:57] blowmage: pipecloud: what problems are you having?
[17:27:53] blowmage: feel free to ask questions in #minitest
[17:28:08] blowmage: tubbo: minitest-line
[17:29:02] blowmage: ??\_(???)_/?? \
[17:29:42] blowmage: the reason minitest-line is not part of minitest is that it isn't backwards compatible to 1.8
[17:32:04] blowmage: no, minitest 5 runs just fine on 1.8
[17:33:30] blowmage: michael_mbp: no, the test classes are built on minitest in rails 4, but the spec dsl is not enabled, use minitest-rails to enable that
[17:35:19] blowmage: i have paired with many folks having issues with minitest over the past year, and it not uncommon to remove minitest-reporters to make things work
[17:36:11] blowmage: tubbo: you were probably talking to zenspider, i think he runs that account


[15:55:37] blowmage: DonovanYoung: minitest's spec dsl only generates test-style objects and methods. its a veneer.
[16:09:16] blowmage: pwz2000: do you have any validations on the model? if so, put the error messages in the flash: `flash[:error] = "Date was not posted! #{@letsgo.errors.full_messages.join(', ')}"`


[00:20:22] blowmage: rallyrails: minitest-rails enables the spec dsl in your tests, and includes generators and stuff
[00:20:59] blowmage: if you want to enable the spec dsl without minitest-rails, this blaurgh explains how
[00:21:45] blowmage: no, support for the spec dsl was removed from rails 4
[00:22:05] blowmage: all my lovely commits were reverted
[00:22:14] blowmage: ACTION cries a single tear
[00:23:17] blowmage: tenderlove got it in, i just filled in some gaps
[00:24:01] blowmage: ryanf: gotcha
[00:24:45] blowmage: rallyrails: the gem does everything the post covers and more. you don't have to add all that config to your test_helper


[04:26:36] blowmage: aamax: see my comment
[04:28:52] blowmage: aamax: do all of your tests use `describe`, or are you creating classes that inherit from ActiveSupport::TestCase?
[04:29:32] blowmage: aamax: then you likely added a dependency on rspec
[04:29:55] blowmage: aamax: is rspec listed in your Gemfile.lock file
[04:30:54] blowmage: will the tests run without spork?


[20:01:57] blowmage: bricker: afaik rails 4.1 should be using the minitest 5 gem
[20:50:59] blowmage: bricker: are you using test/unit and not minitest?
[20:51:47] blowmage: but the code you link to is test/unit
[20:52:08] blowmage: where is test/unit getting invoked?
[21:29:41] blowmage: bricker: seems like a problem with rspec then


[14:27:51] blowmage: GhiGt: what version of ruby?
[14:28:43] blowmage: well, mocha should be finding test/unit instead of minitest
[14:32:17] blowmage: what version of mocha was it running pre upgrade?
[14:34:25] blowmage: pin mocha to that version in the gemfile
[14:56:52] blowmage: GhiGt: rails will try to require mocha, and silently captures the error if the require fails, so even though you say `:require => false` in your Gemfile rails will still attempt the require
[14:58:14] blowmage: and rails does require "mocha" instead of require "mocha/setup" like the mocha folks want now, which is why you get the deprecation warning
[14:59:04] blowmage: GhiGt: i don't know why it is looking for minitest on ruby 1.8, i would move off 1.8 asap


[00:45:45] blowmage: aamax: i remember title being one of those things that capybara made difficult recently
[00:47:27] blowmage: aamax:
[22:54:13] blowmage: tjbiddle: obj.persisted? and obj.new_record?


[16:32:40] blowmage: ziggles: the View Object is closer to the presenters that jay fields talked about
[16:35:26] blowmage: i gave a presentation on presenters at a railsconf, what they are and aren't
[16:36:13] blowmage: decorators and serilaizers are sometimes called presenters, or use the presenter pattern, and i think that causes more confusion
[16:36:50] blowmage: so i consider the "presenter pattern" a spectrum of ideas that are loosly related, if at all
[16:37:05] blowmage: ziggles:
[17:17:05] blowmage: i find it a needless abstraction
[19:24:34] blowmage: ziggles: awesome, that's the nicest thing you could say to me :)


[16:35:47] blowmage: TvL2386: look at assert_raises
[16:37:25] blowmage: TvL2386: err = assert_raises { something.that_raises }
[16:37:54] blowmage: then assert on err


[14:30:13] blowmage: baordog: str = "This line has a backslash: \\"
[14:30:50] blowmage: str = "This line has a forward slash: /"
[14:46:19] blowmage: baordog: that's a backslash


[16:45:48] blowmage: cschneid: the way rails 4 rc1 depends on minitest means that you don't have the spec dsl available to you out of the box
[16:46:54] blowmage: to enable the spec dsl, depend on minitest ~4.7 in your gemfile, and add this to your test helper: `class ActiveSupport::TestCase; include MiniTest::Spec::DSL; end`
[16:47:13] blowmage: then you can use `describe` in the places you would normally use `context`
[16:47:50] blowmage: you can group tests, but not like rspec's describe blocks
[16:48:24] blowmage: cschneid: also see this:
[16:51:29] blowmage: i recommend splitting tests into separate files whether using the classical test stule or the spec dsl
[16:58:55] blowmage: srruby: require "minitest/autorun"
[17:01:32] blowmage: srruby: look at autotest


[17:13:15] blowmage: def setup; @foo =; end
[17:13:25] blowmage: before do; @foo =; end


[18:19:38] blowmage: Dreamer3: what is the full warning message?
[18:20:12] blowmage: Dreamer3: pasted where?
[18:21:13] blowmage: Dreamer3: have you tried `gem "mocha" require: false`?
[18:21:40] blowmage: do you have mocha in your gemfile?
[18:22:32] blowmage: mocha is a bag of hurt
[18:23:13] blowmage: glad it helped :)


[16:41:53] blowmage: assert_equal expected, actual
[16:45:49] blowmage: danneu: take a look at wrong:


[18:39:35] blowmage: ner0x: why do you say that?
[18:41:23] blowmage: ner0x:
[20:29:03] blowmage: no, you can translate it yourself. its not hard


[19:44:25] blowmage: ner0x: you ever get an answer?
[20:21:39] blowmage: ner0x: your issues getting the rails test to work using minitest
[20:24:17] blowmage: ner0x: using rails 4?
[20:26:22] blowmage: i am confused to what you are expecting that to do. why did you add minitest?
[20:31:58] blowmage: ner0x: if you want to use minitest in rails 3 and want all the rails integration stuff, i'd recommend using minitest-rails
[20:32:04] blowmage: but i am biased
[21:24:35] blowmage: i saw it. was there a question?


[15:15:37] blowmage: jammanbo: it looks like you are stubbing a method that doesn't exist on that object, ues?
[15:19:23] blowmage: jammanbo: mocks in minitest are not the same as in rspec, so you may not get the same behavior. you should try stubbing in your test and not in the setup
[15:19:41] blowmage: or switch to a mocking library that works more like your expectations
[15:21:00] blowmage: jammanbo: also, check out simple_mock


[00:33:23] blowmage: Radar: hello friend
[00:34:56] blowmage: ACTION loves zedas
[00:35:03] blowmage: ACTION also loves zenspider


[17:06:35] blowmage: i'm working on it
[17:06:44] blowmage:
[17:08:38] blowmage: imo, you shouldn't have to install half a dozen gems to start testing
[17:09:01] blowmage: with rails 4 we can even use the minitest spec dsl for our tests, without installing anything
[17:10:01] blowmage: i was referring to Sylario's comment about installing "rspec, fgirl, spork,guard, capybara, faker"
[17:10:36] blowmage: i never said you won't have to read the docs, i said install gems
[17:11:27] blowmage: "and each time i look for docs i end up installing new gems"
[17:15:10] blowmage: Sylario: i have a screencast:
[17:16:37] blowmage: minitest/spec
[17:17:55] blowmage: rspec uses minitest's assertions, but that's it
[17:21:40] blowmage: i bet you can copy and paste them with minimal changes
[17:21:56] blowmage: minitest tried hard to be mostly compatible with rpsec's dsl
[17:23:47] blowmage: workmad3: minitest uses "must" in place of "should", and "wont" in place of "should_not"
[17:24:51] blowmage: you can use matchers, if you add minitest-matchers to your project and require minitest/matchers in your helper
[17:26:19] blowmage: i mean to say that minitest doesn't support matchers out-of-the-box, but you can use minitest-matchers to add support for them
[17:27:27] blowmage: tintin: not usually. rails 2 to 3 was a bigger upgrade, but it isn't usually that bad
[17:27:49] blowmage: upgrades like 3.0 to 3.1 to 3.2 isn't hard at all
[17:28:33] blowmage: i don't think 3 to 4 will be nearly as bad as 2 to 3
[17:28:46] blowmage: most of the core architectural changes were made in 3
[17:29:04] blowmage: 4 is mostly new features, afaik


[00:37:39] blowmage: take a look at minitest-rails, it gives you fancy generators for your tests
[00:38:48] blowmage: and if you tack on `--spec` to your generator calls, it will spit out tests that use the spec dsl
[00:39:55] blowmage: you can test your views outside of a controller with minitest, but there aren't any generators that will create those tests for you
[00:40:52] blowmage: trappist: i have a screencast:


[20:53:16] blowmage: scrapcode: i agree with erichmenge that its better to start with test/unit or minitest when learning
[20:53:20] blowmage: also, you got that error because you typo'd "minimum" in your model
[20:54:46] blowmage: Spaceghostc2c: its not about the spec dsl or assertions to me, its more about bottom-up vs. outside-in
[20:54:48] blowmage: for learning
[20:55:55] blowmage: i've helped many devs learn ruby, rails, and testing, and i find it easier to focus on classical tdd
[20:56:48] blowmage: joonas: i'm independent :)
[20:57:12] blowmage:
[20:57:34] blowmage: no, i was looking for a job, but in the end i decided to go indy and try that for a year or so
[20:58:19] blowmage: yeah, i was still pretty stunned to be in that position at the time
[21:00:41] blowmage: testing:: i was hoping to have an early draft of this up in time for rubyconf, but i don't…


[17:29:45] blowmage: do you start with your very high level acceptance tests and drive down to objects by mocking them first, or do you start with your domain objects and build up from there
[17:30:23] blowmage: the tool is irrelevant. you can easily use capybara and minitest to do bdd-style acceptance testing
[17:31:08] blowmage: ACTION needs to get a version of his book released
[17:31:58] blowmage: yes, that's my point. bdd/tdd isn't tool specific
[17:34:27] blowmage: i guess i don't understand the desire to change your testing library as you switch from acceptance to integration to unit tests
[17:36:01] blowmage: whitethunder: change the rails dependency, throw it up, and see what happens
[17:37:03] blowmage: tdd helps me write *less* code to get my apps working, so it doesn't feel like burden to have great test coverage
[17:37:59] blowmage: i agree with using roi to judge test worth
[17:38:52] blowmage: your tests shouldn't be write-only. the apps i've seen thatthat have oppressive tests usually have teams that never update their tests
[17:40:45] blowmage: the cost of tests isn't the overhead in the time writing the tests, the value of tests is a better design
[17:41:03] blowmage: writing tests to just get coverage is lame, write tests to make your design better
[17:41:38] blowmage: for good reason ;)
[17:43:17] blowmage: which coin are we talking about? inside-out vs. outside-in? or test-first vs. test-after?
[17:49:18] blowmage: the quantity argument:
[17:51:42] blowmage: workmad3: "test-driven != test-first" <- agreed!