summaryrefslogtreecommitdiff
path: root/spec/bundler/bundler
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2019-08-16 10:05:15 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2019-08-16 14:30:23 +0900
commitb8d759806ff825e1b9344ba34b1a2bc4809d0988 (patch)
tree7dc27dc16e5db78e0788b130965eaa3f75576624 /spec/bundler/bundler
parent8cf90a2f80866449a555c76eae6189b687fda7d6 (diff)
[bundler/bundler] Fixup #7297
https://github.com/bundler/bundler/commit/1a0161b970
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2366
Diffstat (limited to 'spec/bundler/bundler')
-rw-r--r--spec/bundler/bundler/build_metadata_spec.rb44
1 files changed, 0 insertions, 44 deletions
diff --git a/spec/bundler/bundler/build_metadata_spec.rb b/spec/bundler/bundler/build_metadata_spec.rb
deleted file mode 100644
index a28e25511a..0000000000
--- a/spec/bundler/bundler/build_metadata_spec.rb
+++ /dev/null
@@ -1,44 +0,0 @@
-# frozen_string_literal: true
-
-require "bundler"
-require "bundler/build_metadata"
-
-RSpec.describe Bundler::BuildMetadata do
- describe "#built_at" do
- it "returns %Y-%m-%d formatted time" do
- expect(Bundler::BuildMetadata.built_at).to eq Time.now.strftime("%Y-%m-%d")
- end
- end
-
- describe "#release?" do
- it "returns false as default" do
- expect(Bundler::BuildMetadata.release?).to be_falsey
- end
- end
-
- describe "#git_commit_sha" do
- context "if instance valuable is defined" do
- before do
- Bundler::BuildMetadata.instance_variable_set(:@git_commit_sha, "foo")
- end
-
- after do
- Bundler::BuildMetadata.remove_instance_variable(:@git_commit_sha)
- end
-
- it "returns set value" do
- expect(Bundler::BuildMetadata.git_commit_sha).to eq "foo"
- end
- end
- end
-
- describe "#to_h" do
- subject { Bundler::BuildMetadata.to_h }
-
- it "returns a hash includes Built At, Git SHA and Released Version" do
- expect(subject["Built At"]).to eq Time.now.strftime("%Y-%m-%d")
- expect(subject["Git SHA"]).to be_instance_of(String)
- expect(subject["Released Version"]).to be_falsey
- end
- end
-end