lib/rspec/instafail.rb in rspec-instafail-0.5.0 vs lib/rspec/instafail.rb in rspec-instafail-1.0.0

- old
+ new

@@ -1,4 +1,9 @@ module RSpec - version = Gem.loaded_specs["rspec-core"].version - require "rspec/instafail/rspec_#{[3, version.segments.first].min}" + gem_spec = Gem::Specification.find_all_by_name('rspec-core').first + if gem_spec + version = gem_spec.version + require "rspec/instafail/rspec_#{[3, version.segments.first].min}" + else + require "rspec/instafail/rspec_1" + end end