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

Routing spec failures against Rails master #635

Closed
alindeman opened this issue Nov 13, 2012 · 4 comments
Closed

Routing spec failures against Rails master #635

alindeman opened this issue Nov 13, 2012 · 4 comments
Assignees
Labels

Comments

@alindeman
Copy link
Contributor

Investigate what's going on here: https://travis-ci.org/rspec/rspec-rails/jobs/3164707

@dchelimsky
Copy link
Contributor

The problem is that the route_to matcher depends on assert_recognizes, which now depends on the diff method in MiniTest::Unit.

Need to think about the best solution here. One is to re-write the matcher so it depends on Rails APIs that are not part of the test framework. Another is to grab the diff method and make it available to rspec-rails.

@ghost ghost assigned alindeman Dec 1, 2012
@brupm
Copy link

brupm commented Dec 2, 2012

Here's another example, rails master.

Failures:

  1) CompaniesController routing routes to #index
     Failure/Error: get("/companies").should route_to("companies#index")
     NoMethodError:
       undefined method `message' for #<RSpec::Core::ExampleGroup::Nested_1::Nested_1:0x007f9e15af10a8>
     # ./spec/routing/companies_routing_spec.rb:7:in `block (3 levels) in <top (required)>'

Finished in 0.08059 seconds
1 example, 1 failure

@alindeman
Copy link
Contributor Author

Right. This one is definitely on my radar. Hoping to have a fix for it out soon.

@brupm
Copy link

brupm commented Dec 6, 2012

💯

alindeman added a commit that referenced this issue Jan 7, 2013
* This allows Rails assertions to use minitest assertion methods like
  `assert_equal` and `message` without interfering with RSpec example
  groups. Especially in the case of something like `message`, it's
  plausible that a user would setup a `let(:message)` and we would not
  want it to conflict with Rails attempting to use the `message` method
  from minitest.

* The use of class variables is unfortunate, but it's the only way I
  could think of (right now) to avoid using `define_method` and paying
  the price of a closure for every method call to the isolated class.

* Fixes #635
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants