Comments (4)
Additionally, things seem to be working okay in the Rails console:
$ rails c test
Loading test environment (Rails 3.2.3)
> assert { true }
NoMethodError: undefined method `assert' for main:Object
> require 'wrong/adapters/minitest'
=> true
> include Wrong
=> Object
irb(main):004:0> assert { true }
=> nil
from wrong.
Thanks for the detailed report. I'm looking into it now.
from wrong.
Looks like somewhere along the line Rails is including Test::Unit::Assertions into its ActionController::TestCase, even though ultimately it's a MiniTest::Unit::TestCase (with MiniTest::Unit::Assertions to boot). So testunit is overriding wrong's override of minitest's assert. I'll have to dig into the Rails code base to see what's up with that.
from wrong.
Looks like I'm going to have to rework the whole adapter system so that it can differentiate between raw minitest and minitest inside Rails.
In the meantime a workaround is to not do "require 'wrong/adapters/minitest'" and instead just put this in your test_helper.rb:
class ActiveSupport::TestCase
# ...
include Wrong
end
The problem with that workaround is that failures will be tallied as errors (since it won't be using the right exception class).
from wrong.
Related Issues (20)
- lines are a *little* too long for rspec HOT 1
- Puzzling behavior with eventually and rspec be_nil matcher
- Project name feels wrong - can't google it :( HOT 4
- Cannot install 'wrong' gem because of sexp_processor dependency HOT 2
- wrong causes assert_select to fail HOT 1
- Wrong + Zeus
- Misleading output when variables inside assert block have gone out of scope HOT 2
- NameError on otherwise un-referenced block arg in failing example HOT 1
- Race Condition with "reentry"
- conflicts with minitest in Rails 4 and rspec_rails HOT 6
- wrong takes over `expect`... unexpectedly HOT 1
- Bump gem version HOT 8
- License missing from gemspec
- Rails 4.1/Rspec-rails 2.99 broken HOT 1
- Fails to handle Ranges
- Add missing tags
- Doesn't produce the expected output HOT 1
- NameError when trying to debug in RubyMine
- FEATURE: Ruby 2.6/RubyVM::AST Upgrade HOT 1
- uninitialized constant Wrong::Date
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 wrong.