forked from DartBuild/cocoapods-embed-flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspec_helper.rb
50 lines (38 loc) · 1.04 KB
/
spec_helper.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
require 'pathname'
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
$:.unshift((ROOT + 'lib').to_s)
$:.unshift((ROOT + 'spec').to_s)
require 'bundler/setup'
require 'bacon'
require 'mocha-on-bacon'
require 'pretty_bacon'
require 'pathname'
require 'cocoapods'
Mocha.configure { |c| c.stubbing_non_existent_method = :prevent }
require 'cocoapods_plugin'
#-----------------------------------------------------------------------------#
module Pod
# Disable the wrapping so the output is deterministic in the tests.
#
UI.disable_wrap = true
# Redirects the messages to an internal store.
#
module UI
@output = ''
@warnings = ''
class << self
attr_accessor :output
attr_accessor :warnings
def puts(message = '')
@output << "#{message}\n"
end
def warn(message = '', actions = [])
@warnings << "#{message}\n"
end
def print(message)
@output << message
end
end
end
end
#-----------------------------------------------------------------------------#