Skip to content

Commit ea73ed5

Browse files
committed
Make benchmark exapmles as optional
1 parent e6dc9ff commit ea73ed5

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

spec/integration/syntax_suggest_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,5 +235,5 @@ def bar
235235
end_is_missing_here
236236
EOM
237237
end
238-
end
238+
end if defined?(::Benchmark)
239239
end

spec/spec_helper.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
require "bundler/setup"
44
require "syntax_suggest/api"
55

6-
require "benchmark"
6+
begin
7+
require "benchmark"
8+
rescue LoadError
9+
end
710
require "tempfile"
811

912
RSpec.configure do |config|

0 commit comments

Comments
 (0)