diff options
author | Hiroshi SHIBATA <[email protected]> | 2024-01-11 11:34:25 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2024-01-17 08:28:31 +0900 |
commit | afb30eb2654253c938fbf47dbb6e24c2a3b74625 (patch) | |
tree | bc7a577b06b118da4115e1e493f25e2c5dad296d /spec/ruby/library/base64/strict_encode64_spec.rb | |
parent | 05e798269fd4471fbc87f3e4de7728b28b6a0915 (diff) |
spec/mspec/tool/wrap_with_guard.rb 'ruby_version_is ""..."3.4"' spec/ruby/library/base64/**/*_spec.rb
Diffstat (limited to 'spec/ruby/library/base64/strict_encode64_spec.rb')
-rw-r--r-- | spec/ruby/library/base64/strict_encode64_spec.rb | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/spec/ruby/library/base64/strict_encode64_spec.rb b/spec/ruby/library/base64/strict_encode64_spec.rb index 7cabcf190c..c7f9f12a96 100644 --- a/spec/ruby/library/base64/strict_encode64_spec.rb +++ b/spec/ruby/library/base64/strict_encode64_spec.rb @@ -1,19 +1,22 @@ require_relative '../../spec_helper' -require 'base64' +ruby_version_is ""..."3.4" do -describe "Base64#strict_encode64" do - it "returns the Base64-encoded version of the given string" do - Base64.strict_encode64("Now is the time for all good coders\nto learn Ruby").should == - "Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4gUnVieQ==" - end + require 'base64' - it "returns the Base64-encoded version of the given shared string" do - Base64.strict_encode64("Now is the time for all good coders\nto learn Ruby".split("\n").last).should == - "dG8gbGVhcm4gUnVieQ==" - end + describe "Base64#strict_encode64" do + it "returns the Base64-encoded version of the given string" do + Base64.strict_encode64("Now is the time for all good coders\nto learn Ruby").should == + "Tm93IGlzIHRoZSB0aW1lIGZvciBhbGwgZ29vZCBjb2RlcnMKdG8gbGVhcm4gUnVieQ==" + end + + it "returns the Base64-encoded version of the given shared string" do + Base64.strict_encode64("Now is the time for all good coders\nto learn Ruby".split("\n").last).should == + "dG8gbGVhcm4gUnVieQ==" + end - it "returns a US_ASCII encoded string" do - Base64.strict_encode64("HI").encoding.should == Encoding::US_ASCII + it "returns a US_ASCII encoded string" do + Base64.strict_encode64("HI").encoding.should == Encoding::US_ASCII + end end end |