Skip to content
Browse files

Test for imposed version number as last part of gem directory name fo…

…r frozen gems

[#4295 state:resolved]

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 17f2fb4 commit f2990620d716146064d9d2f88ac487025d4b031a @colincasey colincasey committed with josevalim May 16, 2010
View
8 railties/test/gem_dependency_test.rb
@@ -113,6 +113,14 @@ def test_gem_load_frozen_minimum_version
assert_not_nil DUMMY_GEM_C_VERSION
assert_equal '0.6.0', DUMMY_GEM_C_VERSION
end
+
+ def test_gem_load_frozen_when_platform_string_is_present
+ dummy_gem = Rails::GemDependency.new "dummy-gem-l"
+ dummy_gem.add_load_paths
+ dummy_gem.load
+ assert_not_nil DUMMY_GEM_L_VERSION
+ assert_equal "1.0.0", DUMMY_GEM_L_VERSION
+ end
def test_gem_load_missing_specification
dummy_gem = Rails::GemDependency.new "dummy-gem-d"
View
28 railties/test/vendor/gems/dummy-gem-l-1.0.0-x86-mswin32/.specification
@@ -0,0 +1,28 @@
+--- !ruby/object:Gem::Specification
+name: dummy-gem-l
+version: !ruby/object:Gem::Version
+ version: 1.0.0
+platform: mswin32
+authors:
+- "Nobody"
+date: 2008-10-03 00:00:00 -04:00
+files:
+- lib
+- lib/dummy-gem-l.rb
+require_paths:
+- lib
+required_ruby_version: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: "0"
+ version:
+required_rubygems_version: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: "0"
+ version:
+requirements: []
+specification_version: 2
+summary: Dummy Gem L
View
1 railties/test/vendor/gems/dummy-gem-l-1.0.0-x86-mswin32/lib/dummy-gem-l.rb
@@ -0,0 +1 @@
+DUMMY_GEM_L_VERSION="1.0.0"

0 comments on commit f299062

Please sign in to comment.
Something went wrong with that request. Please try again.