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

Update before/after block for RSpec 3.x support #13

Closed
wants to merge 5 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
5 changes: 3 additions & 2 deletions lib/rspec_api_blueprint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@


RSpec.configure do |config|
config.before(:suite) do

config.before(:suite) do |example|
if defined? Rails
api_docs_folder_path = File.join(Rails.root, '/api_docs/')
else
Expand All @@ -17,7 +18,7 @@
end
end

config.after(:each, type: :request) do
config.after(:each, type: :request) do |example|
response ||= last_response
request ||= last_request

Expand Down
2 changes: 1 addition & 1 deletion lib/rspec_api_blueprint/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module RspecApiBlueprint
VERSION = "0.0.8"
VERSION = "0.1.0"
end
4 changes: 2 additions & 2 deletions rspec_api_blueprint.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "bundler", "~> 1.3"
spec.add_development_dependency "rake"

spec.add_dependency 'rspec-rails'
end
spec.add_dependency 'rspec-rails', '~> 3.0'
end