similar to: Did rails or shoulda go insane on the inflection of 'taxes'?

Displaying 20 results from an estimated 400 matches similar to: "Did rails or shoulda go insane on the inflection of 'taxes'?"

2011 Jun 30
8
Error of DEPRECATION WARNING
Hi, I Have a strange error when i type the command "rake db:migrate " Can you help to solve this error or give me some advices the error is: DEPRECATION WARNING: Rake tasks in /home/joanne/Desktop/picto/vendor/ plugins/prawnto/tasks/prawnto_tasks.rake are deprecated. Use lib/tasks instead. (called from <top (required)> at /home/joanne/Desktop/picto/ Rakefile:7) thanks for help
2008 Jan 10
21
Shoulda
Hey, we''re currently using shoulda (http://dev.thoughtbot.com/ shoulda/) on a project and I saw some things that would be really nice to see in rspec, namely the should_ methods, and especially the should_be_restful method. Do these go against the rspec goals at all? Or could an ambitious programmer go to town implementing these for rspec_on_rails? Nathan Sutton fowlduck at
2011 Jul 11
36
has_many and belongs_to association
Hi , I want to test the one below but I got the problem belongs_to :name, :class_name => "Phrase", :foreign_key => "name" in my test context "test"do should have_many :phrases end in language.rb belongs_to :name, :class_name => "Phrase", :foreign_key => "name" error is 1) Failure: test: check has_many and belongs_to
2011 Sep 14
1
rspec and should have_many through
Hi, Anyone can help me with rspec shoulda validations please. I can''t get the syntax right for these validations. Please correct me it { should have_one :tradable, :through => :trade_order} it { should belong_to :source, :polymorphic => true } it { should have_many :transfers, :as => :source } this is for Rspec 2, rails 3.1, gem "rspec-rails" gem
2012 Mar 13
4
minitest validations - is there a cleaner way?
i am trying out minitest, but need some advice on a clean way to test validations. I setup my testing to use minitest by following the following railscast plus i added miniskirt for Factories. http://railscasts.com/episodes/327-minitest-with-rails everything works well, but there has to be a cleaner way of testing failed validations. would i be better off using something besides
2012 Jan 27
3
How to test the model dependence ?
Good morning, I''m new to rails and am having some basic questions in development. See if anyone can help me with a test problem. I need to test if my model "Procedure" is linked to the workflow. If not, the system must acknowledge an error. Below is the code that is in the file test \ unit \ procedure_test.rb. require ''test_helper'' class ProcedureTest <
2007 May 05
4
autogenerated it (was ''Custom Matcher and NAME NOT GENERATED annoyance'')
> On 5/5/07, Luis Lavena <luislavena at gmail.com> wrote: > > describe "A User (in general)" do > > before(:each) do > > @user = User.new > > end > > > > it { @user.should have_many(:contest_public_votes) } > > it { @user.should have_many(:design_industry_user_interests) } > > it { @user.should
2010 Aug 11
6
rspec2 not working with shoulda
I am using rails edge. I am using gem "rspec-rails", "= 2.0.0.beta. 19" . I have following code at spec/models/user_spec.rb require ''spec_helper'' describe User do it { should validate_presence_of(:email) } it { should validate_presence_of(:name) } end Here is my gemfile group :development, :test do gem ''factory_girl_rails'',
2010 Dec 22
8
Shoulda issue: no more "should have_instance_methods" ?
I''m using Shoulda. After copying the code here.... .... http://joshuaclayton.github.com/code/2009/07/14/should-act-as-list.html.... into my test_helper file so I can test acts_as_list, I came across issues. For one I realized I had to get rid of the _ between the "should" and "have" in past cases, but here, I get this error when I run my unit test:
2009 Jun 27
6
User has many topics or subtopics
Hi, So i have users in the system and i have topics. Topics also have_many subtopics. What is the cleanest way to setup the AR relationships if a user can either have_many topics or subtopics ? Its basically a dual select box dropdown, where the second dropdown is optional. Is the best to have user_topics, and user_subtopics tables and manage that way ? or combine into one table with STI
2009 Jun 07
6
Missing Template when testing with the Brain Buster Captcha partial
When I run my functional tests, they throw an error with the following message: ActionView::TemplateError: Missing template /_captcha.erb in view path app/views:test/vendor/plugins/brain_buster/views/brain_busters On line #23 of app/views/contacts/_form.html.erb 20: <%= f.label :message %><br /> 21: <%= f.text_area :message %> 22:
2011 Jul 28
2
RSpec, shoulda-matchers and Rails model attributes validations
I was trying out RSpec framework in a project and got stopped doing the unit test of a model. In particular, doing the test for the associations and the ActiveRecord validations. I started writing the validations but my tests didn''t look DRY at all. Before refactoring the tests checked out and look for other people solutions. I found out shoulda-matchers and Shoulda (which if I
2010 Jun 15
8
Allow blank on should validate_uniqueness_of
Hello, Using shoulda, any ideas how to allow blank when having this test: should validate_uniqueness_of(:email) Thanks. -- J. Pablo Fernández <pupeno-GAtDADarczzQT0dZR+AlfA@public.gmane.org> (http://pupeno.com) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2009 Apr 22
15
Why RSpec?
I like Shoulda. Sometimes I like plain old Test::Unit. Cucumber gives me a different thought process. I''d just like to hear some thoughts on why RSpec? What does it buy me that I can''t get with Shoulda? I just can''t seem to think in RSpec. Where is there a good example of RSpec tests that will help me grasp the right path? Thanks! -- Amos King
2007 Oct 19
11
Patch idea for rspec_on_rails
I recently wrote a matcher for testing AR associations which allows you to specify things like: Foo.should have_many(:bars).through(:bazes) I''m pretty darned proud of it and a couple of people have suggested that I should submit it to the rspec_on_rails project. Before I go to the trouble of writing out rdoc and fully spec''ing it, I just wanted to make sure this was
2007 Mar 29
21
a better "should have valid associations"
This is pretty much the same as last time around, if you recall. Thanks to Wilson for converting to the new form. I''ve added a few lines. Basically, it iterates over your model associations and does two things. - First, just try to call the association. Usually fixes speeling erors or other such silliness. - Second, try to find a record with an :include on the association. This
2011 Jun 30
2
How to play with shoulda with functional testing
Hi, I am new in rails testing, and now i try to use shoulda to test the functional section. can anyone give me some advice, example or recommend tutorial site to me.. thanks -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To
2009 Mar 03
1
shoulda tested better
We''ve made quite a few contributions in our facebooker fork (http://github.com/collectiveidea/facebooker ), but unfortunately, one thing some of our contributions have in common with many others is the lack of testing. I want to change that. I''d like to help lead an effort to make the facebooker tests better. One thing that I think would help is a little better
2011 Sep 05
0
undefined method `dependent' - rspec and shoulda
hello, Getting this error when using shoulda and rspec for model tests. my gemfile ... gem "shoulda-matchers" .. spec file .. it { should have_many(:balances).dependent(:destroy) } error: User shoulda validations Failure/Error: it { should have_many(:balances).dependent(:destroy) } NoMethodError: undefined method `dependent'' for
2010 Nov 02
7
Testing attr_accessible (and/or attr_protected)
I''ve been puzzling over how to test that attr_accessible has been set for the correct columns; but the tests I''ve come up with so far seem to fail to fail when I expect. I came across this old message from this list: http://www.mail-archive.com/rspec-users at rubyforge.org/msg01570.html Which seemed like a plausible example, but my attempt (modeled on the example)