File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 1212 described_class . from_stub ( gemspec )
1313 end
1414
15+ let ( :with_java_gem_stub_spec ) do
16+ gemspec = Gem ::Specification . new do |s |
17+ s . name = "gemname"
18+ s . version = "1.0.0"
19+ s . loaded_from = __FILE__
20+ s . platform = "java"
21+ end
22+
23+ described_class . from_stub ( gemspec )
24+ end
25+
1526 describe "#from_stub" do
1627 it "returns the same stub if already a Bundler::StubSpecification" do
1728 stub = described_class . from_stub ( with_bundler_stub_spec )
4354 end
4455 end
4556
57+ describe "#ignored?" do
58+ skip "This example is only for without JRuby" if RUBY_ENGINE == 'jruby'
59+
60+ it "returns true if the gem is for different platform" do
61+ stub = described_class . from_stub ( with_java_gem_stub_spec )
62+ allow ( stub ) . to receive ( :missing_extensions? ) . and_return ( true )
63+ expect ( stub ) . to_not receive ( :warn )
64+ expect ( stub . ignored? ) . to be true
65+ end
66+ end
67+
4668 describe "#missing_extensions?" do
4769 it "returns false if manually_installed?" do
4870 stub = described_class . from_stub ( with_bundler_stub_spec )
You can’t perform that action at this time.
0 commit comments