I was having trouble figuring out how to stub out tests in Rails in the manner that Rspec does, without the rest of the Rspec baggage.
Asked
Active
Viewed 243 times
1 Answers
1
I'm not 100% sure where this belongs, I put it in a file called:
config/initializers/integration_test_overrides.rb
But there might be a better place for it.
class ActionDispatch::IntegrationTest
def self.test(test_string)
if block_given?
super
else
super(test_string) do
skip
end
end
end
end
Now when you call a test without the block:
test "endpoint accepts xml input"
The test will automatically skip it.

zachaysan
- 1,726
- 16
- 32