fix Rscons.set_suffix to append the given suffix if the filename has none

This commit is contained in:
josh committed 2015-01-20 21:13:27 -05:00
1 parent 8142d0bbc8
commit d28722a4bb
3 files changed
+15 -1

No files matched your search

+10
View File
@@ -24,6 +24,16 @@ describe Rscons do
end
end
describe ".set_suffix" do
it "changes the suffix to the new one" do
expect(Rscons.set_suffix("foo.c", ".h")).to eq("foo.h")
end
it "appends a suffix if the given file name does not have one" do
expect(Rscons.set_suffix("bazz", ".d")).to eq("bazz.d")
end
end
describe ".get_system_shell" do
before(:each) do
Rscons.class_variable_set(:@@shell, nil)