Skip to content

Commit d290cd2

Browse files
committed
Merge pull request #9 from tddbc/rspec3.1
Update RSpec and bundle update
2 parents fd5d9e9 + 16a6db1 commit d290cd2

File tree

4 files changed

+73
-54
lines changed

4 files changed

+73
-54
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
source 'https://rubygems.org'
22

33
group :development do
4-
gem 'rspec', '~> 3.0.0'
4+
gem 'rspec', '~> 3.1.0'
55

6-
gem 'guard-rspec', "~> 4.2.9"
6+
gem 'guard-rspec', "~> 4.3.1"
77

88
# Runs on Mac OS X
99
gem 'growl'

Gemfile.lock

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
celluloid (0.15.2)
5-
timers (~> 1.1.0)
4+
celluloid (0.16.0)
5+
timers (~> 4.0.0)
66
coderay (1.1.0)
77
diff-lcs (1.2.5)
8-
ffi (1.9.3)
8+
ffi (1.9.6)
99
formatador (0.2.5)
1010
growl (1.0.3)
1111
guard (2.6.1)
@@ -14,47 +14,49 @@ GEM
1414
lumberjack (~> 1.0)
1515
pry (>= 0.9.12)
1616
thor (>= 0.18.1)
17-
guard-rspec (4.2.9)
17+
guard-rspec (4.3.1)
1818
guard (~> 2.1)
1919
rspec (>= 2.14, < 4.0)
20-
libnotify (0.8.3)
20+
hitimes (1.2.2)
21+
libnotify (0.8.4)
2122
ffi (>= 1.0.11)
22-
listen (2.7.6)
23+
listen (2.7.11)
2324
celluloid (>= 0.15.2)
2425
rb-fsevent (>= 0.9.3)
2526
rb-inotify (>= 0.9)
26-
lumberjack (1.0.6)
27+
lumberjack (1.0.9)
2728
method_source (0.8.2)
28-
pry (0.9.12.6)
29-
coderay (~> 1.0)
30-
method_source (~> 0.8)
29+
pry (0.10.1)
30+
coderay (~> 1.1.0)
31+
method_source (~> 0.8.1)
3132
slop (~> 3.4)
3233
rb-fsevent (0.9.4)
33-
rb-inotify (0.9.4)
34+
rb-inotify (0.9.5)
3435
ffi (>= 0.5.0)
3536
rb-notifu (0.0.4)
36-
rspec (3.0.0)
37-
rspec-core (~> 3.0.0)
38-
rspec-expectations (~> 3.0.0)
39-
rspec-mocks (~> 3.0.0)
40-
rspec-core (3.0.0)
41-
rspec-support (~> 3.0.0)
42-
rspec-expectations (3.0.0)
37+
rspec (3.1.0)
38+
rspec-core (~> 3.1.0)
39+
rspec-expectations (~> 3.1.0)
40+
rspec-mocks (~> 3.1.0)
41+
rspec-core (3.1.7)
42+
rspec-support (~> 3.1.0)
43+
rspec-expectations (3.1.2)
4344
diff-lcs (>= 1.2.0, < 2.0)
44-
rspec-support (~> 3.0.0)
45-
rspec-mocks (3.0.0)
46-
rspec-support (~> 3.0.0)
47-
rspec-support (3.0.0)
48-
slop (3.5.0)
45+
rspec-support (~> 3.1.0)
46+
rspec-mocks (3.1.3)
47+
rspec-support (~> 3.1.0)
48+
rspec-support (3.1.2)
49+
slop (3.6.0)
4950
thor (0.19.1)
50-
timers (1.1.0)
51+
timers (4.0.1)
52+
hitimes
5153

5254
PLATFORMS
5355
ruby
5456

5557
DEPENDENCIES
5658
growl
57-
guard-rspec (~> 4.2.9)
59+
guard-rspec (~> 4.3.1)
5860
libnotify
5961
rb-notifu
60-
rspec (~> 3.0.0)
62+
rspec (~> 3.1.0)

Rakefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
require "rspec/core/rake_task"
2+
3+
RSpec::Core::RakeTask.new(:spec)
4+
5+
task :default => :spec
6+

spec/spec_helper.rb

Lines changed: 37 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
# Given that it is always loaded, you are encouraged to keep this file as
77
# light-weight as possible. Requiring heavyweight dependencies from this file
88
# will add to the boot time of your test suite on EVERY test run, even for an
9-
# individual file that may not need all of that loaded. Instead, make a
10-
# separate helper file that requires this one and then use it only in the specs
11-
# that actually need it.
9+
# individual file that may not need all of that loaded. Instead, consider making
10+
# a separate helper file that requires the additional dependencies and performs
11+
# the additional setup, and require it from the spec files that actually need it.
1212
#
1313
# The `.rspec` file also contains a few flags that are not defaults but that
1414
# users commonly want.
@@ -21,6 +21,29 @@
2121
Dir["#{root_dir}/lib/**/*.rb"].each { |f| require f }
2222

2323
RSpec.configure do |config|
24+
# rspec-expectations config goes here. You can use an alternate
25+
# assertion/expectation library such as wrong or the stdlib/minitest
26+
# assertions if you prefer.
27+
config.expect_with :rspec do |expectations|
28+
# This option will default to `true` in RSpec 4. It makes the `description`
29+
# and `failure_message` of custom matchers include text for helper methods
30+
# defined using `chain`, e.g.:
31+
# be_bigger_than(2).and_smaller_than(4).description
32+
# # => "be bigger than 2 and smaller than 4"
33+
# ...rather than:
34+
# # => "be bigger than 2"
35+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
36+
end
37+
38+
# rspec-mocks config goes here. You can use an alternate test double
39+
# library (such as bogus or mocha) by changing the `mock_with` option here.
40+
config.mock_with :rspec do |mocks|
41+
# Prevents you from mocking or stubbing a method that does not exist on
42+
# a real object. This is generally recommended, and will default to
43+
# `true` in RSpec 4.
44+
mocks.verify_partial_doubles = true
45+
end
46+
2447
# The settings below are suggested to provide a good initial experience
2548
# with RSpec, but feel free to customize to your heart's content.
2649
=begin
@@ -31,6 +54,17 @@
3154
config.filter_run :focus
3255
config.run_all_when_everything_filtered = true
3356
57+
# Limits the available syntax to the non-monkey patched syntax that is recommended.
58+
# For more details, see:
59+
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
60+
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
61+
# - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching
62+
config.disable_monkey_patching!
63+
64+
# This setting enables warnings. It's recommended, but in some cases may
65+
# be too noisy due to issues in dependencies.
66+
config.warnings = true
67+
3468
# Many RSpec users commonly either run the entire suite or an individual
3569
# file, and it's useful to allow more verbose output when running an
3670
# individual spec file.
@@ -57,28 +91,5 @@
5791
# test failures related to randomization by passing the same `--seed` value
5892
# as the one that triggered the failure.
5993
Kernel.srand config.seed
60-
61-
# rspec-expectations config goes here. You can use an alternate
62-
# assertion/expectation library such as wrong or the stdlib/minitest
63-
# assertions if you prefer.
64-
config.expect_with :rspec do |expectations|
65-
# Enable only the newer, non-monkey-patching expect syntax.
66-
# For more details, see:
67-
# - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
68-
expectations.syntax = :expect
69-
end
70-
71-
# rspec-mocks config goes here. You can use an alternate test double
72-
# library (such as bogus or mocha) by changing the `mock_with` option here.
73-
config.mock_with :rspec do |mocks|
74-
# Enable only the newer, non-monkey-patching expect syntax.
75-
# For more details, see:
76-
# - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
77-
mocks.syntax = :expect
78-
79-
# Prevents you from mocking or stubbing a method that does not exist on
80-
# a real object. This is generally recommended.
81-
mocks.verify_partial_doubles = true
82-
end
8394
=end
8495
end

0 commit comments

Comments
 (0)