Below is a spec test that's failing, however in rubular.com it is a full match.
Failure/Error: expect(chef_run.remote_file(temp_file).source).to match(/.+ddagent-cli-4.4.0.msi/)
expected ["https://s3.amazonaws.com/ddagent-windows-stable/ddagent-cli-4.4.0.msi"] to match /.+ddagent-cli-4.4.0.msi/
Diff:
@@ -1,2 +1,2 @@
-/.+ddagent-cli-4.4.0.msi/
+["https://s3.amazonaws.com/ddagent-windows-stable/ddagent-cli-4.4.0.msi"]
It looks as if in rspec the regex is not being evaluated as a regex, but rather just a string. Why would this work in rubular and in irb but not here in chefspec?
Below is a spec test that's failing, however in rubular.com it is a full match.
It looks as if in rspec the regex is not being evaluated as a regex, but rather just a string. Why would this work in rubular and in
irb
but not here in chefspec?rspec gems on my machine: