Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Global before :all hooks with specified :type are not run with 2.14.0 #825
Here's how to reproduce it:
# Gemfile group :development, :test do gem 'rspec-rails', '2.14.0' end
RSpec.configure do |config| config.before :all, type: :request do raise "should fail!" end end
# spec/requests/failing_spec.rb require "spec_helper" describe "always failing" do it "should fail" do end end
It will work as inspected if using
referenced this issue
Sep 19, 2013
This comment has been minimized.
This comment has been minimized.Show comment Hide comment
Forgot to mention, that when nesting with context, then it seems to work as expected:
# spec/requests/working_spec.rb describe "working" do context "yup, working" do it "will fail, as expected because before all hook will raise" do end end end
Also, when removing
# spec_helper.rb before :all do p self.class.metadata[:type] end