Skip to content

Update memoized_helpers.rb

gitlab-qa-bot requested to merge github/fork/ioquatix/patch-1 into master

Created by: ioquatix

I would like to write specs like this:

	context '#localhost?' do
		let(:url_string) {"https://localhost"}
		let(:hostname) {self.class.metadata.fetch(:description_args).first}
		subject {Async::HTTP::Endpoint.parse(url_string, hostname: hostname)}
		
		describe 'localhost' do
			it "should be localhost" do
				is_expected.to be_localhost
			end
		end
		
		describe 'hello.localhost' do
			it "should be localhost" do
				is_expected.to be_localhost
			end
		end
		
		describe 'localhost.' do
			it "should be localhost" do
				is_expected.to be_localhost
			end
		end
		
		describe 'hello.localhost.' do
			it "should be localhost" do
				is_expected.to be_localhost
			end
		end
	end

but right now it's very cumbersome to get the actual inner most description.

Merge request reports