-
-
Notifications
You must be signed in to change notification settings - Fork 909
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
NoMethodError when testing with join_table #476
Comments
Thanks for the report. Which version of Rails are you on? |
Rails 4.1 with Ruby 2.1.1 |
+1 (Rails 4.0.1, Ruby 2.1.1) |
So |
@mcmire So what you are saying is that the method exists, but is unusable? |
Yup -- it's a method that's internal to the matcher. Unfortunately when the name was chosen we didn't realize that it's also an option to habtm. I'll actually reopen this issue as it is a legitimate usability bug. |
What about renaming |
That would be fine with me. I don't have time for this right now but if you want to take a crack at it that would be great! |
Sounds good. I'll get on it, but I'd prefer to wait until we come to a conclusion on #511. |
Has anyone started to work on this issue? |
@mcmire I don't fully understand what the problem is, we have defined |
@Adam89 The problem is that the OP expected
|
I am working through this issue and the strange thing is I keep on getting a message of Username for 'https://github.com': Adam89 Any help is appreciated cc @mcmire |
A I understand what the problem is, I am now going to have to make a fork and the push to my own fork since I am no longer a collaborator. Thanks |
Ok, so now that we have a join table sub-matcher, I think it will be simple enough to implement this feature. @Adam89 are you still working on it? Would you mind if i give it a go? |
+1 on this issue for me. Was a resolution ever reached? PS. Rails 4.1.8, Ruby 2.1.4 |
No, there's a PR open for it (#556) but it needs to be finished out. |
Oh - thank you for the heads up. I'll check it out. |
You're right, thanks! |
I have the following line in my code:
has_and_belongs_to_many :future_cars, :join_table => :users_future_cars, :class_name => "Car"
The test line is
it { should have_and_belong_to_many(:future_cars).join_table(:users_future_cars).class_name("Car") }
, but for some reason this throws the following error:All the tables do exist and everything works with manual testing.
The text was updated successfully, but these errors were encountered: