Comments (6)
What do you mean "specify it by hand"?
from rspec-rails.
Like this:
describe UsersController, :type => :controller do end
from rspec-rails.
You can get that like this now:
Rspec.configure do |c| c.include Foo, :example_group => { :describes => lambda {|described| described < ActionController::Base } } end
Make sense?
from rspec-rails.
I can follow what you're doing. Is this a conscious design decision, or just a more global approach or workaround?
from rspec-rails.
rspec-2 is based on Micronaut, which is a complete re-write of the runner. This sort of filtering is built-in, so I'm hesitant to add other ways to do the same thing.
This will be well documented by the time we go 2.0.0-final, but there are a lot of other priorities right now.
I'll leave this open for now and we'll see how it goes.
from rspec-rails.
Add :type => :xxx to metadata for each specialized example group.
- controller
- helper
- mailer
- request
- routing
- view
This supports attaching behaviour to a subset of example groups in a
config block:
RSpec.configure do |c|
before(:each, :type => :controller) do
# do something
end
end
Note that this is not mean you can attach controller spec behaviour to a
group like this:
DOES NOT WORK
describe "something", :type => :controller do
Closed by b3ab2bc.
from rspec-rails.
Related Issues (20)
- Allow erb extension for template files HOT 1
- `url_for` fails to generate route with using `resource` method in config/routes.rb HOT 3
- Rails 7.1.beta.1: second test failure on system specs HOT 4
- rails 7.1 stub_template issue: undefined method `unshift' for #<ActionView::PathSet HOT 4
- Wrong variable name when generate scaffold with namespace & model-name options HOT 1
- Providing JSON data no longer works in request specs with Rails 7.1 HOT 6
- Template stubs are not removed in Rails 7.1. HOT 4
- Rails 7.1 hangs in github actions when use_transactional_fixtures = true HOT 6
- "expect to receive with" throws error when switching to Rails 7.1 HOT 17
- Rails/RedundantActiveRecordAllMethod false positive HOT 1
- Rails 7.1 upgrade: using deprecated preview_path= HOT 3
- Rails 7.1 raise WrongScopeError on take_failed_screenshot HOT 3
- be_routable not working in controller spec with Rails 7.1 HOT 2
- Wrap examples with Rails executor HOT 2
- Fixtures for namespaced models don't seem to work in rspec-rails 6.1.0 HOT 6
- Even if specify the use of TestUnit, it will be overwritten by Minitest and cannot be used. HOT 6
- stub_template isn't working as expected on latest version HOT 1
- render_template is not working HOT 12
- View example group inserts controller path into lookup_context in the wrong order HOT 2
- :git => "git://github.com/rspec/rspec.git" Not working anymore HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rspec-rails.