spec/gemfiles_spec.rb in schema_dev-1.2.5 vs spec/gemfiles_spec.rb in schema_dev-1.3.0
- old
+ new
@@ -3,11 +3,19 @@
describe SchemaDev::Gemfiles do
it "copies listed files" do
config = get_config(ruby: %W[1.9.3 2.1.5], rails: %W[4.0 4.1], db: %W[sqlite3 postgresql])
in_tmpdir do
- SchemaDev::Gemfiles.build(config)
+ expect(SchemaDev::Gemfiles.build(config)).to be_truthy
expect(relevant_diff(config, "gemfiles")).to be_empty
+ end
+ end
+
+ it "only copies files once" do
+ config = get_config(ruby: %W[1.9.3 2.1.5], rails: %W[4.0 4.1], db: %W[sqlite3 postgresql])
+ in_tmpdir do
+ expect(SchemaDev::Gemfiles.build(config)).to be_truthy
+ expect(SchemaDev::Gemfiles.build(config)).to be_falsey
end
end
def relevant_diff(config, dir)
src = SchemaDev::Gemfiles::TEMPLATES_ROOT + dir