diff options
author | David RodrÃguez <deivid.rodriguez@riseup.net> | 2019-04-12 19:05:26 +0200 |
---|---|---|
committer | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2019-08-03 09:30:00 +0900 |
commit | 7255f55dba83aacbde76184aff965162e339ba2a (patch) | |
tree | 3ea69fd5c7a4883fe934ab15206b1861c76ff0d2 /spec/bundler/bundler | |
parent | d2d6d5c988b66cb110dbb07f92e08f231a31d6bc (diff) | |
download | ruby-7255f55dba83aacbde76184aff965162e339ba2a.tar.gz |
[bundler/bundler] RUBY_ENGINE should always be defined after 1.8.7
https://github.com/bundler/bundler/commit/d6c9196d18
Diffstat (limited to 'spec/bundler/bundler')
-rw-r--r-- | spec/bundler/bundler/ruby_version_spec.rb | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/spec/bundler/bundler/ruby_version_spec.rb b/spec/bundler/bundler/ruby_version_spec.rb index 3ac7d9ef3a..ef1a5fe575 100644 --- a/spec/bundler/bundler/ruby_version_spec.rb +++ b/spec/bundler/bundler/ruby_version_spec.rb @@ -426,22 +426,12 @@ RSpec.describe "Bundler::RubyVersion and its subclasses" do end describe "#engine" do - context "RUBY_ENGINE is defined" do - before { stub_const("RUBY_ENGINE", "jruby") } - before { stub_const("JRUBY_VERSION", "2.1.1") } + before { stub_const("RUBY_ENGINE", "jruby") } + before { stub_const("JRUBY_VERSION", "2.1.1") } - it "should return a copy of the value of RUBY_ENGINE" do - expect(subject.engine).to eq("jruby") - expect(subject.engine).to_not be(RUBY_ENGINE) - end - end - - context "RUBY_ENGINE is not defined" do - before { stub_const("RUBY_ENGINE", nil) } - - it "should return the string 'ruby'" do - expect(subject.engine).to eq("ruby") - end + it "should return a copy of the value of RUBY_ENGINE" do + expect(subject.engine).to eq("jruby") + expect(subject.engine).to_not be(RUBY_ENGINE) end end |