DEV Community

n350071🇯🇵
n350071🇯🇵

Posted on

[RSpec] for helper

TL;DR

define let(:helper) { get_helper } and use it as the receiver.

👍 You can write like this

describe ApplicationController, type: :controller do
  let(:helper) { get_helper }

  describe '#hello' do
    it { expect(helper.hello).to eq 'hello' }
  end
end

🔗 Parent Note

Top comments (0)