Skip to content

Commit

Permalink
Specify existing behaviour for parsing empty values.
Browse files Browse the repository at this point in the history
This behaviour was present but unspecified. Adding a test
for clarity that this works to aid cross-compatibility with
other dotenv implementations.
  • Loading branch information
joho committed Mar 22, 2017
1 parent 78a4dcb commit 3138461
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/dotenv/parser_spec.rb
Expand Up @@ -145,6 +145,10 @@ def env(string)
expect(env("foo='ba#r' ")).to eql("foo" => "ba#r")
end

it "parses empty values" do
expect(env("foo=")).to eql("foo" => "")
end

if RUBY_VERSION > "1.8.7"
it "parses shell commands interpolated in $()" do
expect(env("echo=$(echo hello)")).to eql("echo" => "hello")
Expand Down

0 comments on commit 3138461

Please sign in to comment.