I just don't get why "expect(foo).to eq(bar)" is in any way more readable or usable than "assert_equal(foo,bar)" (foo.should == bar is dead)
@samsaffron @blowmage except it's not "foo" and "bar", it's expected and actual. Which goes where on an assert?
-
-
@bascule Its `assert_equal expected, actual`. Think of it as opposite of rspec’s `actual.should == expected`. Intentionally backwards. :) -
@blowmage one syntax actually makes that clear just by reading it without having to consult documentation to confirm :O -
@bascule I’m confident you could internalize the positional convention fairly easily. -
@blowmage sure, but if it's clear from context isn't that more "readable" and "usable" than having to memorize? -
@bascule I find it more readable and more usable. And I find creating custom assertions way easier than custom matchers. -
@blowmage@bascule I agree with that ... found my self doing the same yesterday, simpler https://github.com/discourse/discourse/blob/master/spec/components/site_settings/local_process_provider_spec.rb#L6-L10 … - End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.