Skip to content

Commit

Permalink
match major <=> major, and minor <=> minor
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jul 24, 2013
1 parent f8ff7dc commit 2ffb33f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ def exists_and_version_matches lib, path, const

require File.join(path, version_path)

RSpec::Core::Version::STRING == Object.const_get(const)::Version::STRING
core_major, core_minor, _ = *RSpec::Core::Version::STRING.split('.')
lib_major, lib_minor, _ = *Object.const_get(const)::Version::STRING.split('.')

core_major == lib_minor && core_minor == lib_minor
end

{ 'rspec' => 'RSpec', 'rspec-expectations' => 'RSpec::Expectations', 'rspec-mocks' => 'RSpec::Mocks' }.each do |lib,const|
Expand Down

0 comments on commit 2ffb33f

Please sign in to comment.