Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for rspec 3.3 #27

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: ruby
rvm:
- 2.1
- 2.2
gemfile:
- gemfiles/rspec_3.2.gemfile
- gemfiles/rspec_3.3.gemfile
before_install: gem update --remote bundler
script:
- bundle exec rake spec
7 changes: 7 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
appraise 'rspec-3.2' do
gem 'rspec', '~> 3.2.0'
end

appraise 'rspec-3.3' do
gem 'rspec', '~> 3.3.0'
end
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
#!/usr/bin/env rake
require 'bundler/setup'
require "bundler/gem_tasks"

begin
require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

task :default => :spec
rescue LoadError
end
7 changes: 7 additions & 0 deletions gemfiles/rspec_3.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rspec", "~> 3.2.0"

gemspec :path => "../"
83 changes: 83 additions & 0 deletions gemfiles/rspec_3.2.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
PATH
remote: ../
specs:
rspec-retry (0.4.0)
rspec-core

GEM
remote: https://rubygems.org/
specs:
appraisal (2.0.2)
bundler
rake
thor (>= 0.14.0)
byebug (4.0.5)
columnize (= 0.9.0)
coderay (1.1.0)
columnize (0.9.0)
diff-lcs (1.2.5)
ffi (1.9.9)
formatador (0.2.5)
guard (2.12.7)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.6.0)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
listen (3.0.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
nenv (0.2.0)
notiffany (0.0.6)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.1.0)
byebug (~> 4.0)
pry (~> 0.10)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rspec (3.2.0)
rspec-core (~> 3.2.0)
rspec-expectations (~> 3.2.0)
rspec-mocks (~> 3.2.0)
rspec-core (3.2.3)
rspec-support (~> 3.2.0)
rspec-expectations (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-mocks (3.2.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
shellany (0.0.1)
slop (3.6.0)
thor (0.19.1)

PLATFORMS
ruby

DEPENDENCIES
appraisal
guard-rspec
pry-byebug
rspec (~> 3.2.0)
rspec-retry!

BUNDLED WITH
1.10.5
7 changes: 7 additions & 0 deletions gemfiles/rspec_3.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "rspec", "~> 3.3.0"

gemspec :path => "../"
83 changes: 83 additions & 0 deletions gemfiles/rspec_3.3.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
PATH
remote: ../
specs:
rspec-retry (0.4.0)
rspec-core

GEM
remote: https://rubygems.org/
specs:
appraisal (2.0.2)
bundler
rake
thor (>= 0.14.0)
byebug (4.0.5)
columnize (= 0.9.0)
coderay (1.1.0)
columnize (0.9.0)
diff-lcs (1.2.5)
ffi (1.9.9)
formatador (0.2.5)
guard (2.12.7)
formatador (>= 0.2.4)
listen (>= 2.7, <= 4.0)
lumberjack (~> 1.0)
nenv (~> 0.1)
notiffany (~> 0.0)
pry (>= 0.9.12)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.6.0)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
listen (3.0.0)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
lumberjack (1.0.9)
method_source (0.8.2)
nenv (0.2.0)
notiffany (0.0.6)
nenv (~> 0.1)
shellany (~> 0.0)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.1.0)
byebug (~> 4.0)
pry (~> 0.10)
rake (10.4.2)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
ffi (>= 0.5.0)
rspec (3.3.0)
rspec-core (~> 3.3.0)
rspec-expectations (~> 3.3.0)
rspec-mocks (~> 3.3.0)
rspec-core (3.3.1)
rspec-support (~> 3.3.0)
rspec-expectations (3.3.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-mocks (3.3.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.3.0)
rspec-support (3.3.0)
shellany (0.0.1)
slop (3.6.0)
thor (0.19.1)

PLATFORMS
ruby

DEPENDENCIES
appraisal
guard-rspec
pry-byebug
rspec (~> 3.3.0)
rspec-retry!

BUNDLED WITH
1.10.5
10 changes: 8 additions & 2 deletions lib/rspec_ext/rspec_ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,16 @@ def clear_exception
module RSpec
module Core
class ExampleGroup
def clear_memoized
# __memoized is private method and is defined in rspec 3.3
__memoized.instance_variable_get(:@memoized).clear
rescue NameError
@__memoized = nil
end

def clear_lets
@__memoized = {}
clear_memoized
end
end
end
end

1 change: 1 addition & 0 deletions rspec-retry.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Gem::Specification.new do |gem|
gem.require_paths = ["lib"]
gem.version = RSpec::Retry::VERSION
gem.add_runtime_dependency %{rspec-core}
gem.add_development_dependency %q{appraisal}
gem.add_development_dependency %q{rspec}
gem.add_development_dependency %q{guard-rspec}
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2')
Expand Down