aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
Diffstat (limited to 'railties')
-rw-r--r--railties/test/gem_dependency_test.rb21
-rw-r--r--railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification29
-rw-r--r--railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb1
-rw-r--r--railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification49
-rw-r--r--railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb1
5 files changed, 101 insertions, 0 deletions
diff --git a/railties/test/gem_dependency_test.rb b/railties/test/gem_dependency_test.rb
index 4ff4fe8d43..ff27af5572 100644
--- a/railties/test/gem_dependency_test.rb
+++ b/railties/test/gem_dependency_test.rb
@@ -145,6 +145,27 @@ class GemDependencyTest < Test::Unit::TestCase
end
end
+ def test_gem_ignores_development_dependencies
+ dummy_gem = Rails::GemDependency.new "dummy-gem-k"
+ dummy_gem.add_load_paths
+ dummy_gem.load
+ assert_equal 1, dummy_gem.dependencies.size
+ end
+
+ def test_gem_guards_against_duplicate_unpacks
+ dummy_gem = Rails::GemDependency.new "dummy-gem-a"
+ dummy_gem.stubs(:frozen?).returns(true)
+ dummy_gem.expects(:unpack_base).never
+ dummy_gem.unpack
+ end
+
+ def test_gem_does_not_unpack_framework_gems
+ dummy_gem = Rails::GemDependency.new "dummy-gem-a"
+ dummy_gem.stubs(:framework_gem?).returns(true)
+ dummy_gem.expects(:unpack_base).never
+ dummy_gem.unpack
+ end
+
def test_gem_from_directory_name
dummy_gem = Rails::GemDependency.from_directory_name('dummy-gem-1.1')
assert_equal 'dummy-gem', dummy_gem.name
diff --git a/railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification
new file mode 100644
index 0000000000..b3f7930948
--- /dev/null
+++ b/railties/test/vendor/gems/dummy-gem-h-1.0.0/.specification
@@ -0,0 +1,29 @@
+--- !ruby/object:Gem::Specification
+name: dummy-gem-h
+version: !ruby/object:Gem::Version
+ version: 1.3.0
+platform: ruby
+authors:
+- "Nobody"
+date: 2008-10-03 00:00:00 -04:00
+dependencies:
+files:
+- lib
+- lib/dummy-gem-h.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 H
diff --git a/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb b/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb
new file mode 100644
index 0000000000..0f91234936
--- /dev/null
+++ b/railties/test/vendor/gems/dummy-gem-h-1.0.0/lib/dummy-gem-h.rb
@@ -0,0 +1 @@
+DUMMY_GEM_H_VERSION="1.0.0"
diff --git a/railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification b/railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification
new file mode 100644
index 0000000000..20edd0f856
--- /dev/null
+++ b/railties/test/vendor/gems/dummy-gem-k-1.0.0/.specification
@@ -0,0 +1,49 @@
+--- !ruby/object:Gem::Specification
+name: dummy-gem-k
+version: !ruby/object:Gem::Version
+ version: 1.3.0
+platform: ruby
+authors:
+- "Nobody"
+date: 2008-10-03 00:00:00 -04:00
+dependencies:
+- !ruby/object:Gem::Dependency
+ name: dummy-gem-k
+ type: :runtime
+ version_requirement:
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: 1.0.0
+ version:
+- !ruby/object:Gem::Dependency
+ name: dummy-gem-h
+ type: :development
+ version_requirement:
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: 1.0.0
+ version:
+files:
+- lib
+- lib/dummy-gem-k.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 I
diff --git a/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb b/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb
new file mode 100644
index 0000000000..97fb1d69ce
--- /dev/null
+++ b/railties/test/vendor/gems/dummy-gem-k-1.0.0/lib/dummy-gem-k.rb
@@ -0,0 +1 @@
+DUMMY_GEM_K_VERSION="1.0.0"