Sha256: aea01d16b0d78ade383cd0aef7fbaeb57197bef10e4f34653cee3c0dacd7d7a0
Contents?: true
Size: 1.11 KB
Versions: 4
Compression:
Stored size: 1.11 KB
Contents
require_relative '../lib/projects.rb' require 'fileutils' describe Projects do it "should be able to add a new Project" do projects=Projects.new projects['github/dev_projects.gem'] = 'https://github.com/lou-parslow/dev_projects.gem.git' projects.update expect(projects['github/dev_projects.gem'].is_a?(Project)).to eq(true) expect(projects['github/dev_projects.gem'][:name]).to eq('github/dev_projects.gem') end it "should be able to store and load" do FileUtils.mkdir('tmp') if(!File.exists?('tmp')) FileUtils.rm('tmp/test.project.json') if(File.exists?('tmp/test.project.json')) expect(File.exists?('tmp/test.project.json')).to eq(false) projects=Projects.new projects['github/dev_projects.gem'] = 'https://github.com/lou-parslow/dev_projects.gem.git' projects.save 'tmp/test.project.json' expect(File.exists?('tmp/test.project.json')).to eq(true) projects2=Projects.new projects2.open 'tmp/test.project.json' expect(projects2['github/dev_projects.gem'].is_a?(Project)).to eq(true) FileUtils.rm('tmp/test.project.json') if(File.exists?('tmp/test.project.json')) end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
dev_projects-0.0.8 | spec/projects_spec.rb |
dev_projects-0.0.7 | spec/projects_spec.rb |
dev_projects-0.0.6 | spec/projects_spec.rb |
dev_projects-0.0.5 | spec/projects_spec.rb |