spec/unit/backup_spec.rb in trollolo-0.1.1 vs spec/unit/backup_spec.rb in trollolo-0.2.0
- old
+ new
@@ -1,40 +1,40 @@
-require_relative "spec_helper"
+require_relative 'spec_helper'
include GivenFilesystemSpecHelpers
describe Backup do
- it "sets backup directory" do
+ it 'sets backup directory' do
backup = Backup.new(dummy_settings)
- expect(backup.directory).to match File.expand_path("~/.trollolo/backup")
+ expect(backup.directory).to match File.expand_path('~/.trollolo/backup')
end
- context "custom backup directory" do
+ context 'custom backup directory' do
use_given_filesystem(keep_files: true)
before(:each) do
full_board_mock
@backup = Backup.new(dummy_settings)
@directory = given_directory
@backup.directory = @directory
end
- it "backups board" do
- @backup.backup("53186e8391ef8671265eba9d")
- backup_file = File.join(@directory, "53186e8391ef8671265eba9d", "board.json")
+ it 'backups board' do
+ @backup.backup('53186e8391ef8671265eba9d')
+ backup_file = File.join(@directory, '53186e8391ef8671265eba9d', 'board.json')
expect(File.exist?(backup_file)).to be true
- expect(File.read(backup_file)).to eq load_test_file("full-board.json").chomp
+ expect(File.read(backup_file)).to eq load_test_file('full-board.json').chomp
end
- it "lists backups" do
- @backup.backup("53186e8391ef8671265eba9d")
- expect(@backup.list).to eq ["53186e8391ef8671265eba9d"]
+ it 'lists backups' do
+ @backup.backup('53186e8391ef8671265eba9d')
+ expect(@backup.list).to eq ['53186e8391ef8671265eba9d']
end
- it "shows backup" do
+ it 'shows backup' do
output_capturer = StringIO.new
- @backup.backup("53186e8391ef8671265eba9d")
- @backup.show("53186e8391ef8671265eba9d", output: output_capturer )
+ @backup.backup('53186e8391ef8671265eba9d')
+ @backup.show('53186e8391ef8671265eba9d', output: output_capturer )
expect(output_capturer.string).to eq(<<EOT
Trollolo Testing Board
Sprint Backlog
Sprint 3
(3) P1: Fill Backlog column