Commit 49a9208 Fabrizio Monti
committed
1 parent ebaf5d9 commit 49a9208 Copy full SHA for 49a9208
File tree 4 files changed +15
-18
lines changed
4 files changed +15
-18
lines changed Original file line number Diff line number Diff line change 1
1
--color
2
+ --require spec_helper
Original file line number Diff line number Diff line change 19
19
20
20
context "::start" do
21
21
before do
22
- capture ( :stdout ) { Wordmove ::Generators ::Movefile . start }
22
+ silence_stream ( STDOUT ) { Wordmove ::Generators ::Movefile . start }
23
23
end
24
24
25
25
it 'creates a Movefile' do
45
45
46
46
before do
47
47
FileUtils . cp ( wp_config , "." )
48
- capture ( :stdout ) { Wordmove ::Generators ::Movefile . start }
48
+ silence_stream ( STDOUT ) { Wordmove ::Generators ::Movefile . start }
49
49
end
50
50
51
51
it 'fills database configuration from wp-config' do
Original file line number Diff line number Diff line change 1
1
$LOAD_PATH. unshift File . expand_path ( '../../lib' , __FILE__ )
2
2
3
- require 'rubygems'
4
- require 'bundler/setup'
5
-
6
- require 'wordmove' # and any other gems you need
3
+ require "pry-byebug"
4
+ require "wordmove"
7
5
require 'wordmove/logger'
8
- require 'active_support/core_ext '
6
+ require 'active_support/all '
9
7
require 'thor'
10
8
9
+ Dir [ File . expand_path ( "../support/**/*.rb" , __FILE__ ) ] . sort . each { |f | require f }
10
+
11
11
RSpec . configure do |config |
12
- def capture ( stream )
13
- begin
14
- stream = stream . to_s
15
- eval "$#{ stream } = StringIO.new"
16
- yield
17
- result = eval ( "$#{ stream } " ) . string
18
- ensure
19
- eval ( "$#{ stream } = #{ stream . upcase } " )
20
- end
12
+ config . expect_with :rspec do |expectations |
13
+ expectations . include_chain_clauses_in_custom_matcher_descriptions = true
14
+ end
21
15
22
- result
16
+ config . mock_with :rspec do |mocks |
17
+ mocks . verify_partial_doubles = true
23
18
end
24
19
end
Original file line number Diff line number Diff line change @@ -31,7 +31,8 @@ Gem::Specification.new do |spec|
31
31
32
32
spec . add_development_dependency "bundler" , ">= 1.6.2"
33
33
spec . add_development_dependency "rake" , "~> 10.0"
34
- spec . add_development_dependency "rspec" , "< 3"
34
+ spec . add_development_dependency "rspec" , "~> 3.2"
35
+ spec . add_development_dependency "pry-byebug" , "~> 3.1"
35
36
36
37
spec . post_install_message = <<-EOF
37
38
You can’t perform that action at this time.
0 commit comments