diff --git a/spec/unit/perform_under_spec.rb b/spec/unit/perform_under_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/unit/perform_under_spec.rb
+++ b/spec/unit/perform_under_spec.rb
@@ -1,4 +1,4 @@
-# encoding: utf-8
+# frozen_string_literal: true
 
 RSpec.describe 'RSpec::Benchmark::TimingMatcher', '#perform_under' do
   it "propagates error inside expectation" do
@@ -14,6 +14,12 @@ RSpec.describe 'RSpec::Benchmark::TimingMatcher', '#perform_under' do
     expect(::Benchmark::Perf::ExecutionTime).to have_received(:run).with(repeat: 3, warmup: 1.5)
   end
 
+  it "doesn't allow sample size less than 1" do
+    expect {
+      expect { 'x' * 1024 * 10 }.to perform_under(0.006).sec.sample(0)
+    }.to raise_error(/Repeat value: 0 needs to be greater than 0/)
+  end
+
   context "expect { ... }.to perfom_under(...).sample" do
     it "passes if the block performs under threshold" do
       expect {
Change to disallow sample size smaller than 1 in ref to issue #8