similar to: Passing NilClass To Create & MiniTest Backtrace Cleaner

Displaying 20 results from an estimated 2000 matches similar to: "Passing NilClass To Create & MiniTest Backtrace Cleaner"

2011 Oct 19
1
Rails 3.1 and minitest
I''m looking for a simple way to integrate minitest/spec with Rails 3.1. Anybody have it working? There''s an older article on MetaSkills about this but it adds stuff I don''t want. -- 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
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
2013 Jun 09
2
Minitest mock or stub methods
Hi I''m building a small library to use in my Rails app which interacts with a 3rd party API. It fetches artists and tracks. So I have: lib/my_lib.rb lib/my_lib/artist.rb lib/my_lib/track.rb To get an artist I do artist = MyLib::Artist.find("Oasis") Which returns an instance of Artist if it finds (via 3rd party API) it or nil otherwise. Then I can call artist.tracks which
2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
'tc_410_close_event.rb' was not being run. You could prove this by simply inserting "exit 1" into that test. The reason is unclear, but by renaming every class and method in the tests to be unique, this ensures the tests are run. --- ruby/t/tc_010_load.rb | 4 ++-- ruby/t/tc_020_create.rb | 4 ++-- ruby/t/tc_030_create_flags.rb | 4 ++--
2010 Mar 10
1
ifelse logic and multiple assignments
I'm a fairly new R user and while I have a solution to my problem I'm wondering if there is a better one. In SAS it's common to use if/then logic along with a "do" statement to make several things happen. While I could do the same thing in R using a "for" loop, and "if" and {}, I've read that loops are less common in R and I wonder if I'm doing
2011 Nov 05
2
Where is my gem file located so that i can rake test
Googling around, I found that apparently adding to the gem file will fix my problems, but where do i find the gem file? what is the name of the gem file? "group :test do # Pretty printed test output gem ''minitest'' ####### add this line ####### end" Here is what happens when i run rake test, please note that i have already installed minitest
2019 Jan 17
1
[hivex PATCH] ruby: improve test functions
Use better functions to check for proper values instead of assert: - refute_nil for non-null functions - assert_equal for checking equality Also, make sure that the parameters for assert_equal are correct: expected value, then got value. --- ruby/tests/tc_120_rlenvalue.rb | 4 ++-- ruby/tests/tc_130_special.rb | 12 ++++++------ ruby/tests/tc_200_write.rb | 4 ++--
2012 Oct 21
0
rails g problem
When I enter rails g, I get the bunch of logs behind. Any idea what I''m missing? I though it''s trying to install minitest, so I manually installed it. Still this error persists. $ rails g gem install minitest /Library/Ruby/Gems/1.8/gems/activesupport-3.2.8/lib/active_support/dependencies.rb:251:in `require'': no such file to load -- minitest/unit
2016 Feb 23
0
[PATCH 2/2] ruby: tests: use more asserts instead of manual checks
Make more use of assert_equal/refute_equal instead of manually checking values and raising errors. --- ruby/t/tc_100_launch.rb | 4 +--- ruby/t/tc_410_close_event.rb | 8 ++------ ruby/t/tc_420_log_messages.rb | 4 +--- ruby/t/tc_810_rhbz664558c6.rb | 4 +--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ruby/t/tc_100_launch.rb b/ruby/t/tc_100_launch.rb index
2013 Apr 02
10
Suggested strategies for testing a gem against Rails 3.x and Rails 4?
I''ve seen a few examples of dummy Rails apps (for testing, so they live under test or spec dirs, typically) for use with the Appraisals gem that supposedly work with both Rails 3.x and Rails 4, but they seem hackish and not fully functional. It is somewhat expected, as it is a stripped down Frankenstein monster that is trying to be compatible with various versions of Rails 3 as well
2007 Apr 17
1
undefined method `each'' for nil:NilClass with Ferret search
Hi All: For certain key terms I always get this error; I had to rebuild the indexes then it works for a while then again it is gone. here is the message ActionView::TemplateError (undefined method `each'' for nil:NilClass) on line #4 /usr/local/lib/ruby/gems/1.8/gems/actionpack-1.12.5/lib/action_view/base.rb:316:in `compile_and_render_template''
2013 Jul 22
0
Could not intern from yaml: undefined method `intern' for nil:NilClass
Hi everyone, I''m stuck with this error trying to set up inspection reports : Could not send report: Error 400 on SERVER: Could not intern from yaml: undefined method `intern'' for nil:NilClass Earlier, I had this one : Could not run: Could not find catalog for hostname That I fixed with : catalog_cache_terminus = yaml Agent and server are running puppet 3.2.3. Full
2008 Jan 22
2
Could not set file on ensure: undefined method `[]'' for nil:NilClass
Hi, I had a working puppet setup using version 0.22 until the ruby security patch bit me. I tried upgrading server and clients to 0.24.1 however my old manifests don''t seem to work anymore. When I run puppetd on the client I see lots of messages like: err: //Node[waterbuck]/yumupdater/Remotefile[/etc/cron.hourly/yumupdater]/File[/etc/cron.hourly/yumupdater]/ensure: change from absent
2005 May 27
2
undefined method `>' for nil:NilClass
I''m following the Depot tutorial in the Rails book, and have just hit a wall. As instructed by the tutorial, I added the following code to the Product model: protected def validate errors.add(:price, "should be positive") unless price > 0.0 end When I attempt to add a new product, I''m getting an error: undefined method `>'' for nil:NilClass
2006 May 06
0
`connect'': undefined method `verify_mode'' for nil:NilClass
Am using Ruby 1.8.4. I am getting this error: /usr/lib/ruby/1.8/net/http.rb:565:in `connect'': undefined method `verify_mode'' for nil:NilClass (NoMethodError) from /usr/lib/ruby/1.8/net/http.rb:555:in `do_start'' from /usr/lib/ruby/1.8/net/http.rb:544:in `start'' from /usr/lib/ruby/1.8/net/http.rb:1031:in `request'' from
2009 Dec 05
0
err: undefined method `acl_type' for nil:NilClass
Hi, I am using puppet version 0.25.1. Currently when i am starting the server, i am getting the below error. err: undefined method `acl_type'' for nil:NilClass Previously i was getting err: Forbidden request: I added the auth.conf to allow all, and this issue fixed. Please help me. Regards, Shameem -- You received this message because you are subscribed to the Google
2010 Jul 03
0
rspec controller test strange error: undefined method `call' for nil:NilClass
must be doing something dumb.... not sure, but the ''call'' appears to be on the block.call when the respond_to block gets executed. straight forward "channels" resource with a ''create'' action.... only new thing is just assigning the current_user to the model. def create @channel = Channel.new(params[:channel]) @channel.user = @user
2010 Dec 24
0
keep getting "undefined method `map' for nil:NilClass (NoMethodError) " in new server
hi guys, I have a new development server (ubuntu 10). I have done the following (the versions match my existing development machine which works fine): 1. installed ruby 1.9.1p378 2. installed ruby gems 1.3.7 3. installed rails 2.3.8 (used "gem install rails -v 2.3.8") 4. manually installed my other gems including sphinx and thinking sphinx with "gem install ..." 5. ran
2013 Mar 12
0
Puppet 3.1 - Error: Could not run: undefined method `prune_parameters' for nil:NilClass - fresh install on RHEL 6.4
Trying to get my puppet up and running but running into a slight problem - trying to view a resource I get an error for undefined method [root@puppet puppet-dashboard]# puppet resource user root Error: Could not run: undefined method `prune_parameters'' for nil:NilClass [root@puppet puppet-dashboard]# uname -a Linux puppet.luminexcorp.com 2.6.32-358.0.1.el6.x86_64 #1 SMP Tue Feb 26
2005 Apr 26
0
NoMethodError (undefined method `fetch_fields' for nil:NilClass)
Hi I''m new to Rails (and Ruby) and I can''t get it to work properly. Every time I want to do something with my database-connection (e.g. use scaffold) I get this, or something similiar (from development.log): >> Beneath this code there''s some more text << ------- Processing CategoryController#index (for 127.0.0.1 at Tue Apr 26 21:43:45 CEST 2005)