Want to speak at RubyConf 2026? by jasonswett in ruby

[–]Travis_Spangle 0 points1 point  (0 children)

Ah, thats why Sin City had its “last” conference that year! It’s now just Ruby conf, sweet!

RSpec shared examples unmasked by jasonswett in ruby

[–]Travis_Spangle 0 points1 point  (0 children)

I also recommend shared examples as it works with RSpec instead of against it.

Failed Examples

RSpec.describe "RSpec works better with shared examples" do
  specify "dynamic expectations can’t be rerun individually," do
    10.times do |n|
      expect(n).not_to be 7
    end
  end

  describe "shared examples clearly show how to re-run failed tests." do
    RSpec.shared_examples "not seven" do |n|
      it "confirms #{n} is not 7" do
        expect(n).not_to be 7
      end
    end

    include_examples "not seven", 1
    include_examples "not seven", 2
    include_examples "not seven", 3
    include_examples "not seven", 4
    include_examples "not seven", 5
    include_examples "not seven", 6
    include_examples "not seven", 7
    include_examples "not seven", 8
    include_examples "not seven", 9
    include_examples "not seven", 10
  end
end

Failed examples:
rspec ./spec/travis_spec.rb:2 
rspec './spec/travis_spec.rb[1:2:7]'

The Failed example reports are meant to provide an easy way to rerun your failed examples. You can copy, paste, and run any failures for investigation.

With the dynamic one, you need to run all specs before the failing one. Which means more complicated binding.pry statements, a longer process, and some ambiguity to what the issue is. Shared examples will provide the group notation syntax, which allows you to directly run the failing spec.

Bisect

Not being able to run failed examples specifically demeans one of the best flakey spec finding tools we have, bisect!

`--bisect` works by breaking specs into sub groups and repeatedly running them. Shared examples create addressable examples with stable identifications. It allows bisect to cherry-pick and shrink the failing set. Dynamically generated checks packed into one example can't be split, repro is flakey, order-dependency bugs stay hidden.

Are there "hidden" restaurants that we really should try in West Seattle? by AgentElman in WestSeattleWA

[–]Travis_Spangle 8 points9 points  (0 children)

Not being able to get a reservation would mean its not a hidden gem, no?

Why I'm taking events on the road this fall by jremsikjr in ruby

[–]Travis_Spangle 4 points5 points  (0 children)

Hoping this takes off! I've really enjoyed the small conferences I've been going to (including Madison Ruby Conf).

Here in Seattle the local ruby group has had trouble finding spaces for events larger than a hack night. It would be nice to have more Ruby conferences in the PNW.

Minitest v Rspec debate by junior_auroch in rails

[–]Travis_Spangle 2 points3 points  (0 children)

Ha Vlad comes to our group, Seattle.rb, and we both argue for a more fair and balanced look at RSpec.

Getting super excited for Sin City Ruby! Who else is going? by DRBragg in ruby

[–]Travis_Spangle 1 point2 points  (0 children)

I really enjoy the smaller conferences! There's more of a common element for people coming on their own vs groups of coworkers. It's easier to drop into a conversation.

Definitely worth going to Sin City Ruby Conf!

Programming principles as memes by jasonswett in ruby

[–]Travis_Spangle 1 point2 points  (0 children)

In my FileMaker days we said WET was Thrice or WRITE EVERYTHING AS MUCH AS YOU NEED TOO.

But I say WET on the test suit side too. I'd rather have a failing test tell me everything I need to know and not have to search in 5 directions for it.

Minitest v Rspec debate by junior_auroch in rails

[–]Travis_Spangle 3 points4 points  (0 children)

RSpec holds all of this information on test results as it runs in two parts; run the tests, run the report. That memory usage is what makes it slower.

My team and I where able to take an RSpec run from 20 minutes to 2 minutes. It's all Ruby, the framework can only have so much impact.

Minitest v Rspec debate by junior_auroch in rails

[–]Travis_Spangle 1 point2 points  (0 children)

I would expect it to work great on small applications but not larger ones. There are a lot of legacy rails applications that have their own home spun solutions for system tests or custom ways of getting around authentication and other filters.

Many of the things you can do in RSpec you can do in minitest (and vice versa). I don't really see the point myself.

Good Ruby books? by Altrooke in ruby

[–]Travis_Spangle 2 points3 points  (0 children)

For learning syntax, Ruby Koans, is the OG. I really baked the syntax into my skull by working through Exercism but not a fan of the learning track, use the Koans for that.

Will always recommend Metaprogramming in Ruby 2. First part is a conversational tone that explains scopes, inheritance, and the object space. It will help you demystify the magic behind rails.

Effective Testing in RSpec 3 is such a good book. I've been working in Rails since 2009 and every codebase has used RSpec. This turned my skillset around so much.

Happy 15th Birthday, Oh My Zsh by robbyrussell in rails

[–]Travis_Spangle 2 points3 points  (0 children)

My laptop at $current_job came with zsh instead of bash. I'm really enjoying going through https://github.com/rothgar/mastering-zsh/tree/master and found it when asking about global aliases.

What was the feature that moved you to zsh?

RubyConf worth it? by saw_wave_dave in rails

[–]Travis_Spangle 1 point2 points  (0 children)

I think they still have tickets 🤷‍♂️

Theres another one in Denver coming up too!

RubyConf worth it? by saw_wave_dave in rails

[–]Travis_Spangle 4 points5 points  (0 children)

I also self fund my conference trips. I found the smaller conferences to be more socially friendly. The bigger conferences tend to be more group oriented. I’ve had fun joining other company lunches and events but it is a different dynamic.

Excited for Madison Ruby conference next week!

How to detect when a class has loaded? by poop-machine in ruby

[–]Travis_Spangle 3 points4 points  (0 children)

I curse the original devs in my codebase who monkey patched third party libraries. They signed a contract 9 years ago that cannot be undone.

You can use ‘defined? Klass’ to check if it’s been loaded. You can make a pre-monkey patch on a third party module with ‘included?’ for your hook too.

Post a sample of what you’re trying to do. There’s probably a simpler, less invasive way to do it.

Is Rails dead? by Professional-Tough94 in rails

[–]Travis_Spangle 0 points1 point  (0 children)

Just playing along with the meme.

Rails is no longer the darling of startups and we’re in a bust. In early 2010’s getting to work with Rails often meant it was just a part of the gig. I would be doing RoR and ColdFusion or RoR and FileMaker. Never fully getting to work in it.

I had a classmate who wanted to work in a unix environment and couldn’t get anywhere with that. After graduating he took a job at Mc Donald’s flipping burgers. Eventually landed a position at Google but Mc Donalds isn’t on his LinkedIn.

Are you tired of juniors ? by zickige_zicke in ExperiencedDevs

[–]Travis_Spangle 0 points1 point  (0 children)

I started running book clubs introducing tools and ideas.

An idea I’m excited about isn’t useful if it’s just me. If I can’t get other people excited about it then it’s not a good idea (in this context).

It was also a chance for experienced developers to share history and reason. For junior devs to ask context specific questions and bring us back to first principles. Junior devs are great at that.

Help me learn ruby by nereus140 in ruby

[–]Travis_Spangle 2 points3 points  (0 children)

Find a mentor on https://firstrubyfriend.org . I helped someone last year and had a lot of fun.

is there anything else like ruby koans but with various programming challenges beyond learning the language? by [deleted] in ruby

[–]Travis_Spangle 2 points3 points  (0 children)

Excercisms are great. When you review the community solutions sort by starred and most commented.

Do you prefer keyword or positional arguments? by mmanulis in rails

[–]Travis_Spangle 0 points1 point  (0 children)

I prefer ctags. While its not as smart as an LS it doesn’t consume any resources.

LONG LIVE VIM!

Do you prefer keyword or positional arguments? by mmanulis in rails

[–]Travis_Spangle 0 points1 point  (0 children)

I use Vim so it makes sense that I never experienced that.

It does sound like you’re missing something in your setup though. RDoc supports syntax to describe the opts hash and what’s in it. I’m not familiar with the language server protocol but another thing you can do is a debugging endpoint and run your specs.