machines 0.5.4 → 0.5.6
Sign up to get free protection for your applications and to get access to all the features.
- data/.yardopts +7 -1
- data/CHANGELOG.md +16 -4
- data/INSTALL.md +3 -0
- data/LICENSE +1 -2
- data/README.md +47 -28
- data/Rakefile +0 -8
- data/TODO.md +66 -59
- data/bin/machines +1 -2
- data/lib/machines.rb +16 -1
- data/lib/machines/app_settings.rb +1 -1
- data/lib/machines/cloud_machine.rb +1 -1
- data/lib/machines/command.rb +0 -2
- data/lib/machines/commandline.rb +23 -29
- data/lib/machines/commands/checks.rb +67 -0
- data/lib/machines/commands/configuration.rb +50 -0
- data/lib/machines/commands/database.rb +18 -0
- data/lib/machines/commands/file_operations.rb +105 -0
- data/lib/machines/commands/installation.rb +184 -0
- data/lib/machines/commands/questions.rb +16 -0
- data/lib/machines/commands/services.rb +26 -0
- data/lib/machines/core.rb +55 -25
- data/lib/machines/logger.rb +0 -2
- data/lib/machines/named_buffer.rb +7 -6
- data/lib/machines/version.rb +1 -1
- data/lib/packages/awstats.rb +2 -2
- data/lib/packages/docky.rb +0 -1
- data/lib/packages/dwm.rb +5 -0
- data/lib/packages/nginx_logrotate.rb +2 -2
- data/lib/packages/timezone.rb +2 -4
- data/lib/template/Machinesfile +2 -1
- data/lib/template/config.yml +3 -0
- data/spec/lib/machines/app_settings_spec.rb +13 -12
- data/spec/lib/machines/cloud_machine_spec.rb +9 -8
- data/spec/lib/machines/commandline_spec.rb +69 -90
- data/spec/lib/machines/{checks_spec.rb → commands/checks_spec.rb} +1 -1
- data/spec/lib/machines/{configuration_spec.rb → commands/configuration_spec.rb} +2 -3
- data/spec/lib/machines/{database_spec.rb → commands/database_spec.rb} +4 -10
- data/spec/lib/machines/{file_operations_spec.rb → commands/file_operations_spec.rb} +3 -7
- data/spec/lib/machines/{installation_spec.rb → commands/installation_spec.rb} +10 -4
- data/spec/lib/machines/{questions_spec.rb → commands/questions_spec.rb} +1 -3
- data/spec/lib/machines/{services_spec.rb → commands/services_spec.rb} +1 -4
- data/spec/lib/machines/core_spec.rb +81 -65
- data/spec/lib/packages/abiword_spec.rb +1 -5
- data/spec/lib/packages/amazon_mp3_spec.rb +0 -4
- data/spec/lib/packages/awstats_spec.rb +3 -4
- data/spec/lib/packages/base_spec.rb +0 -1
- data/spec/lib/packages/chrome_spec.rb +0 -4
- data/spec/lib/packages/cruisecontrol_spec.rb +1 -2
- data/spec/lib/packages/dependencies_spec.rb +1 -2
- data/spec/lib/packages/docky_spec.rb +0 -4
- data/spec/lib/packages/dotfiles_spec.rb +5 -4
- data/spec/lib/packages/dwm_spec.rb +23 -0
- data/spec/lib/packages/file_roller_spec.rb +1 -5
- data/spec/lib/packages/firefox_spec.rb +0 -4
- data/spec/lib/packages/gedit_spec.rb +1 -5
- data/spec/lib/packages/git_spec.rb +0 -4
- data/spec/lib/packages/gmate_spec.rb +1 -5
- data/spec/lib/packages/gnome_spec.rb +0 -4
- data/spec/lib/packages/gnumeric_spec.rb +1 -5
- data/spec/lib/packages/hosts_spec.rb +0 -1
- data/spec/lib/packages/load_machines_spec.rb +16 -15
- data/spec/lib/packages/monit_spec.rb +0 -1
- data/spec/lib/packages/mysql_spec.rb +1 -3
- data/spec/lib/packages/nginx_logrotate_spec.rb +17 -18
- data/spec/lib/packages/nginx_spec.rb +0 -1
- data/spec/lib/packages/openbox_spec.rb +0 -4
- data/spec/lib/packages/passenger_nginx_spec.rb +0 -1
- data/spec/lib/packages/passenger_spec.rb +0 -1
- data/spec/lib/packages/postfix_spec.rb +1 -5
- data/spec/lib/packages/questions_spec.rb +3 -4
- data/spec/lib/packages/rbenv_spec.rb +1 -4
- data/spec/lib/packages/rvm_spec.rb +1 -4
- data/spec/lib/packages/save_machines_spec.rb +0 -1
- data/spec/lib/packages/slim_spec.rb +1 -2
- data/spec/lib/packages/sqlserver_spec.rb +0 -4
- data/spec/lib/packages/timezone_spec.rb +2 -3
- data/spec/lib/packages/unison_spec.rb +1 -2
- data/spec/lib/packages/virtualbox_guest_spec.rb +0 -4
- data/spec/lib/packages/virtualbox_spec.rb +1 -2
- data/spec/lib/packages/webapps_spec.rb +1 -3
- data/spec/spec_helper.rb +59 -61
- data/spec/support/minitest.rb +4 -62
- metadata +27 -28
- data/lib/machines/base.rb +0 -13
- data/lib/machines/checks.rb +0 -63
- data/lib/machines/configuration.rb +0 -49
- data/lib/machines/database.rb +0 -17
- data/lib/machines/file_operations.rb +0 -104
- data/lib/machines/installation.rb +0 -171
- data/lib/machines/machinesfile.rb +0 -25
- data/lib/machines/questions.rb +0 -15
- data/lib/machines/services.rb +0 -24
- data/spec/lib/machines/machinesfile_spec.rb +0 -34
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/nginx' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('nginx')
|
6
5
|
$conf.from_hash(webserver: {name: 'nginx', version: '1.2.3',
|
7
6
|
path: 'nginx_path', conf_path: 'conf', modules: '--with-http_ssl_module'})
|
8
7
|
$conf.from_hash(:passenger => {:nginx => '/passenger/path/ext/nginx'})
|
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/passenger_nginx' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('passenger_nginx')
|
6
5
|
$conf.from_hash(:webserver => {:path => 'nginx_dest', :version => '1.0.2'})
|
7
6
|
$conf.password = 'pass'
|
8
7
|
$conf.from_hash(:passenger => {:root => '/home/user/gems/passenger-1.2.3'})
|
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/passenger' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('passenger')
|
6
5
|
$conf.user_home = '/home/user'
|
7
6
|
$conf.from_hash(:passenger => {:version => '3.0.7'})
|
8
7
|
$conf.from_hash(:ruby => {:gems_path => 'ruby/gems', :executable => 'bin/ruby'})
|
@@ -1,12 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe 'packages/postfix' do
|
4
|
-
before(:each) do
|
5
|
-
load_package('postfix')
|
6
|
-
$conf.from_hash(:mail => {:domain => 'domain'})
|
7
|
-
end
|
8
|
-
|
9
4
|
it 'adds the following commands' do
|
5
|
+
$conf.from_hash(:mail => {:domain => 'domain'})
|
10
6
|
eval_package
|
11
7
|
$conf.commands.map(&:info).must_equal [
|
12
8
|
"TASK postfix - Install postfix mail",
|
@@ -2,24 +2,23 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/questions' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('questions')
|
6
5
|
$conf.machine = AppConf.new
|
7
6
|
end
|
8
7
|
|
9
8
|
it 'asks for a password' do
|
10
|
-
expects(:enter_password).with('users', false)
|
9
|
+
Core.any_instance.expects(:enter_password).with('users', false)
|
11
10
|
eval_package
|
12
11
|
end
|
13
12
|
|
14
13
|
it 'does not ask for a password when machine is EC2' do
|
15
14
|
$conf.machine.ec2 = {}
|
16
|
-
expects(:enter_password).never
|
15
|
+
Core.any_instance.expects(:enter_password).never
|
17
16
|
eval_package
|
18
17
|
end
|
19
18
|
|
20
19
|
it 'sets password when logging' do
|
21
20
|
$conf.log_only = true
|
22
|
-
expects(:enter_password).never
|
21
|
+
Core.any_instance.expects(:enter_password).never
|
23
22
|
eval_package
|
24
23
|
$conf.passwords.must_equal ['pa55word']
|
25
24
|
$conf.password.must_equal 'pa55word'
|
@@ -2,24 +2,21 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/rbenv' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('rbenv')
|
6
5
|
$conf.ruby = AppConf.new
|
7
6
|
$conf.ruby.version = '1.9.2'
|
8
7
|
$conf.ruby.build = 'p290'
|
8
|
+
eval_package
|
9
9
|
end
|
10
10
|
|
11
11
|
it 'sets gems_path' do
|
12
|
-
eval_package
|
13
12
|
$conf.ruby.gems_path.must_equal '.rbenv/versions/1.9.2-p290/lib/ruby/gems/1.9.1/gems'
|
14
13
|
end
|
15
14
|
|
16
15
|
it 'sets executable' do
|
17
|
-
eval_package
|
18
16
|
$conf.ruby.executable.must_equal '.rbenv/versions/1.9.2-p290/bin/ruby'
|
19
17
|
end
|
20
18
|
|
21
19
|
it 'adds the following commands' do
|
22
|
-
eval_package
|
23
20
|
$conf.commands.map(&:info).join("\n").must_equal [
|
24
21
|
'TASK rbenv - Install ruby-build, rbenv, ruby 1.9.2-p290 and Bundler',
|
25
22
|
"SUDO apt-get -q -y install git-core",
|
@@ -2,23 +2,20 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/rvm' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('rvm')
|
6
5
|
$conf.from_hash(ruby: {version: '1.9.2', build: 'p290'})
|
7
6
|
$conf.from_hash(rvm: {version: '1.0'})
|
7
|
+
eval_package
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'sets gems_path' do
|
11
|
-
eval_package
|
12
11
|
$conf.ruby.gems_path.must_equal '.rvm/gems/1.9.2-p290/@global/gems'
|
13
12
|
end
|
14
13
|
|
15
14
|
it 'sets executable' do
|
16
|
-
eval_package
|
17
15
|
$conf.ruby.executable.must_equal '.rvm/wrappers/1.9.2-p290@global/ruby'
|
18
16
|
end
|
19
17
|
|
20
18
|
it 'adds the following commands' do
|
21
|
-
eval_package
|
22
19
|
$conf.commands.map(&:info).join("\n").must_equal [
|
23
20
|
"TASK rvm - Install RVM",
|
24
21
|
"SUDO apt-get -q -y install git-core",
|
@@ -3,12 +3,11 @@ require 'spec_helper'
|
|
3
3
|
describe 'packages/slim' do
|
4
4
|
before(:each) do
|
5
5
|
$conf.login_theme = 'custom'
|
6
|
-
load_package('slim')
|
7
6
|
FileUtils.mkdir_p 'slim/themes'
|
7
|
+
eval_package
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'adds the following commands' do
|
11
|
-
eval_package
|
12
11
|
$conf.commands.map(&:info).must_equal [
|
13
12
|
"TASK slim - Install SLiM desktop manager",
|
14
13
|
"SUDO apt-get -q -y install slim",
|
@@ -2,7 +2,6 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/timezone' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('timezone')
|
6
5
|
$conf.timezone = 'GB'
|
7
6
|
end
|
8
7
|
|
@@ -10,7 +9,7 @@ describe 'packages/timezone' do
|
|
10
9
|
eval_package
|
11
10
|
$conf.commands.map(&:info).must_equal [
|
12
11
|
"TASK timezone - Set timezone from config.yml",
|
13
|
-
"SUDO ln -sf /
|
12
|
+
"SUDO ln -sf /usr/share/zoneinfo/GB /etc/localtime"
|
14
13
|
]
|
15
14
|
end
|
16
15
|
|
@@ -19,7 +18,7 @@ describe 'packages/timezone' do
|
|
19
18
|
eval_package
|
20
19
|
$conf.commands.map(&:info).must_equal [
|
21
20
|
"TASK timezone - Set timezone from config.yml",
|
22
|
-
"SUDO ln -sf /
|
21
|
+
"SUDO ln -sf /usr/share/zoneinfo/GB /etc/localtime",
|
23
22
|
"SUDO sed -i \"s/UTC=no/UTC=yes/\" /etc/default/rcS"
|
24
23
|
]
|
25
24
|
end
|
@@ -2,13 +2,12 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/unison' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('unison')
|
6
5
|
$conf.machine = AppConf.new
|
7
6
|
$conf.machine.user = 'username'
|
7
|
+
eval_package
|
8
8
|
end
|
9
9
|
|
10
10
|
it 'adds the following commands' do
|
11
|
-
eval_package
|
12
11
|
$conf.commands.map(&:info).must_equal [
|
13
12
|
"TASK unison - Install and configure Unison (users/username/.unison/default.prf)",
|
14
13
|
"SUDO apt-get -q -y install unison",
|
@@ -2,12 +2,11 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/virtualbox' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('virtualbox')
|
6
5
|
$conf.user = 'phil'
|
6
|
+
eval_package
|
7
7
|
end
|
8
8
|
|
9
9
|
it 'adds the following commands' do
|
10
|
-
eval_package
|
11
10
|
$conf.commands.map(&:info).join("\n").must_equal [
|
12
11
|
"TASK virtualbox - Install VirtualBox",
|
13
12
|
"SUDO apt-get -q -y install dkms",
|
@@ -2,11 +2,9 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'packages/webapps' do
|
4
4
|
before(:each) do
|
5
|
-
load_package('webapps')
|
6
|
-
|
7
5
|
$conf.from_hash(:user => {:name => 'username', :home => 'home_dir'}, :ruby => {:version => 'ruby_version'})
|
8
6
|
$conf.webapps = {'application' =>
|
9
|
-
AppBuilder.new(
|
7
|
+
AppSettings::AppBuilder.new(
|
10
8
|
'scm' => 'github.com/project',
|
11
9
|
'branch' => 'master',
|
12
10
|
'name' => 'application',
|
data/spec/spec_helper.rb
CHANGED
@@ -1,55 +1,52 @@
|
|
1
1
|
$LOAD_PATH << 'lib'
|
2
2
|
|
3
3
|
require 'bundler/setup'
|
4
|
-
require 'minitest/
|
5
|
-
require 'mocha'
|
4
|
+
require 'minitest/autorun'
|
5
|
+
require 'mocha/setup'
|
6
6
|
require 'stringio'
|
7
7
|
require 'fakefs/safe'
|
8
8
|
|
9
9
|
Dir['spec/support/*.rb'].each {|file| require File.join('./spec', 'support', File.basename(file)) }
|
10
10
|
require 'machines'
|
11
|
-
application_dir = $conf.application_dir
|
12
|
-
|
13
|
-
include Machines
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
11
|
+
$application_dir = $conf.application_dir
|
12
|
+
|
13
|
+
include Machines
|
14
|
+
modules = %w(Checks Configuration Database FileOperations Installation Questions Services)
|
15
|
+
modules.each { |m| include eval("Machines::Commands::#{m}") }
|
16
|
+
|
17
|
+
module MiniTestSetup
|
18
|
+
def before_setup
|
19
|
+
super
|
20
|
+
$conf.clear
|
21
|
+
$conf.passwords = []
|
22
|
+
$conf.commands = []
|
23
|
+
$conf.tasks = {}
|
24
|
+
$conf.application_dir = $application_dir
|
25
|
+
|
26
|
+
$input = StringIO.new
|
27
|
+
$output = StringIO.new
|
28
|
+
$terminal = HighLine.new($input, $output)
|
29
|
+
|
30
|
+
$debug = FakeOut.new
|
31
|
+
$file = FakeOut.new
|
32
|
+
$console = FakeOut.new
|
33
|
+
Machines::Command.debug = Machines::Logger.new $debug
|
34
|
+
Machines::Command.file = Machines::Logger.new $file
|
35
|
+
Machines::Command.console = Machines::Logger.new $console, :truncate => true
|
36
|
+
|
37
|
+
FakeFS.activate!
|
38
|
+
FileUtils.mkdir_p 'tmp'
|
23
39
|
end
|
24
|
-
end
|
25
|
-
|
26
|
-
MiniTest::Spec.add_setup_hook do
|
27
|
-
include Machines::Checks
|
28
40
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
$input = StringIO.new
|
36
|
-
$output = StringIO.new
|
37
|
-
$terminal = HighLine.new($input, $output)
|
38
|
-
|
39
|
-
$debug = FakeOut.new
|
40
|
-
$file = FakeOut.new
|
41
|
-
$console = FakeOut.new
|
42
|
-
Machines::Command.debug = Machines::Logger.new $debug
|
43
|
-
Machines::Command.file = Machines::Logger.new $file
|
44
|
-
Machines::Command.console = Machines::Logger.new $console, :truncate => true
|
45
|
-
|
46
|
-
FakeFS.activate!
|
47
|
-
FileUtils.mkdir_p 'tmp'
|
41
|
+
def after_teardown
|
42
|
+
FakeFS.deactivate!
|
43
|
+
FakeFS::FileSystem.clear
|
44
|
+
super
|
45
|
+
end
|
48
46
|
end
|
49
47
|
|
50
|
-
MiniTest::
|
51
|
-
|
52
|
-
FakeFS::FileSystem.clear
|
48
|
+
class MiniTest::Test
|
49
|
+
include MiniTestSetup
|
53
50
|
end
|
54
51
|
|
55
52
|
module MiniTest
|
@@ -61,32 +58,36 @@ module MiniTest
|
|
61
58
|
end
|
62
59
|
end
|
63
60
|
|
64
|
-
class
|
65
|
-
|
66
|
-
|
67
|
-
|
61
|
+
class Machines::Core
|
62
|
+
def eval_package content, name
|
63
|
+
eval content, nil, "eval: #{name}"
|
64
|
+
end
|
68
65
|
end
|
69
66
|
|
70
|
-
MiniTest::Spec
|
67
|
+
class MiniTest::Spec::Package < MiniTest::Spec
|
68
|
+
def core
|
69
|
+
@core ||= Core.new
|
70
|
+
end
|
71
71
|
|
72
|
-
def
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
end
|
72
|
+
def load_package
|
73
|
+
FakeFS.deactivate!
|
74
|
+
@package_name = File.basename(self.class.name).split('::').first
|
75
|
+
@package = File.read File.join($conf.application_dir, 'packages', "#{@package_name}.rb")
|
76
|
+
FakeFS.activate!
|
77
|
+
end
|
78
78
|
|
79
|
-
def
|
80
|
-
|
81
|
-
@package_path = File.join($conf.application_dir, File.join('packages', "#{name}.rb"))
|
82
|
-
@package = File.read(@package_path)
|
79
|
+
def eval_package
|
80
|
+
core.eval_package(@package, @package_name)
|
83
81
|
end
|
84
|
-
end
|
85
82
|
|
86
|
-
def
|
87
|
-
|
83
|
+
def before_setup
|
84
|
+
super
|
85
|
+
load_package
|
86
|
+
end
|
88
87
|
end
|
89
88
|
|
89
|
+
MiniTest::Spec.register_spec_type(/packages\//, MiniTest::Spec::Package)
|
90
|
+
|
90
91
|
def save_yaml contents, path
|
91
92
|
File.open(path, 'w') do |f|
|
92
93
|
YAML.dump(contents, f)
|
@@ -98,6 +99,3 @@ def colored string, color
|
|
98
99
|
string.sub!(/(\n|\r)$/, '')
|
99
100
|
$terminal.color(string, color.to_sym) + ending.to_s
|
100
101
|
end
|
101
|
-
|
102
|
-
require 'minitest/autorun'
|
103
|
-
|
data/spec/support/minitest.rb
CHANGED
@@ -1,69 +1,11 @@
|
|
1
|
-
# Standard minitest diff calls the OS's diff command. FakeFS breaks diff because
|
2
|
-
# diff is looking for the files on disk but the files are written by Tempfile
|
3
|
-
# while FakeFS is still active. The following modules provide a pure ruby diff
|
4
|
-
# and override MiniTest::Assertions::diff to utilitize it.
|
5
|
-
|
6
|
-
module Diff
|
7
|
-
attr_accessor :diffs, :sequences
|
8
|
-
|
9
|
-
def self.diffs(old, new)
|
10
|
-
new, old, @diffs = new.lines.to_a, old.lines.to_a, []
|
11
|
-
build_sequences(old, new)
|
12
|
-
find_diffs(old, new, old.size, new.size)
|
13
|
-
end
|
14
|
-
|
15
|
-
private
|
16
|
-
|
17
|
-
def self.find_diffs(old, new, row, col)
|
18
|
-
if row > 0 && col > 0 && old[row-1] == new[col-1]
|
19
|
-
find_diffs(old, new, row-1, col-1)
|
20
|
-
@diffs << { :line => row, :change => :same, :string => old[row-1].strip }
|
21
|
-
elsif col > 0 && (row == 0 || @sequences[row][col-1] >= @sequences[row-1][col])
|
22
|
-
find_diffs(old, new, row, col-1)
|
23
|
-
@diffs << { :line => col, :change => :add, :string => new[col-1].strip }
|
24
|
-
elsif row > 0 && (col == 0 || @sequences[row][col-1] < @sequences[row-1][col])
|
25
|
-
find_diffs(old, new, row-1, col)
|
26
|
-
@diffs << { :line => row, :change => :delete, :string => old[row-1].strip }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
def self.build_sequences(old, new)
|
31
|
-
rows, cols = old.size+1, new.size+1
|
32
|
-
@sequences = rows.times.map{|x|[0]*(x+1)}
|
33
|
-
rows.times.each do |row|
|
34
|
-
cols.times.each do |col|
|
35
|
-
@sequences[row][col] = if old[row-1] == new[col-1]
|
36
|
-
@sequences[row-1][col-1] + 1
|
37
|
-
else
|
38
|
-
[@sequences[row][col-1].to_i, @sequences[row-1][col].to_i].max
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
|
45
1
|
module MiniTest
|
46
2
|
module Assertions
|
47
|
-
|
3
|
+
alias :actual_diff :diff
|
48
4
|
|
49
5
|
def diff exp, act
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
need_to_diff =
|
55
|
-
(expect.include?("\n") ||
|
56
|
-
butwas.include?("\n") ||
|
57
|
-
expect.size > 30 ||
|
58
|
-
butwas.size > 30 ||
|
59
|
-
expect == butwas)
|
60
|
-
|
61
|
-
return "Expected: #{mu_pp exp}\n Actual: #{mu_pp act}" unless need_to_diff
|
62
|
-
|
63
|
-
Diff.diffs(expect, butwas).map do |diff|
|
64
|
-
SYMBOLS[diff[:change]] + diff[:string]
|
65
|
-
end.join("\n")
|
6
|
+
FakeFS.without do
|
7
|
+
actual_diff exp, act
|
8
|
+
end
|
66
9
|
end
|
67
10
|
end
|
68
11
|
end
|
69
|
-
|