search for: minitest

Displaying 20 results from an estimated 40 matches for "minitest".

2016 Jun 07
0
[PATCH 2/2] ruby: tests: Give each test class and method a unique name.
...changed, 28 insertions(+), 28 deletions(-) diff --git a/ruby/t/tc_010_load.rb b/ruby/t/tc_010_load.rb index 2ec0314..06922e1 100644 --- a/ruby/t/tc_010_load.rb +++ b/ruby/t/tc_010_load.rb @@ -17,7 +17,7 @@ require File::join(File::dirname(__FILE__), 'test_helper') -class TestLoad < MiniTest::Unit::TestCase - def test_load +class Test010Load < MiniTest::Unit::TestCase + def test_010_load end end diff --git a/ruby/t/tc_020_create.rb b/ruby/t/tc_020_create.rb index a2a01a1..251512b 100644 --- a/ruby/t/tc_020_create.rb +++ b/ruby/t/tc_020_create.rb @@ -17,8 +17,8 @@ require Fi...
2016 Jun 07
3
[PATCH 1/2] ruby: Print exceptions thrown by event callbacks.
--- generator/ruby.ml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/generator/ruby.ml b/generator/ruby.ml index 97ccfdc..0f71ccc 100644 --- a/generator/ruby.ml +++ b/generator/ruby.ml @@ -404,15 +404,17 @@ event_callback_wrapper_wrapper (VALUE argvv) return Qnil; } +/* Callbacks aren't supposed to throw exceptions. We just print the + * exception on
2010 Mar 10
1
ifelse logic and multiple assignments
...; logic. Since the "ifelse" wants to create a vector the same size as the logical condition it doesn't seem obvious how I'd make several assignments and I worry about simply re-writing the logic for each assignment for fear of introducing errors that would be hard to find later. minitest$FUT.direction <- ifelse((minitest$FUT.lm.max.3.20.r2.price == max), ifelse((minitest$FUT.lm.max.3.20.slope.price > 0),1, 2), ifelse((minitest$FUT.lm.min.3.20.r2.price == max), ifelse((minitest$FUT.lm.min.3.20.slope.price > 0),1, 2), ifelse((minitest$FUT.lm.max.21.100....
2011 Mar 23
0
Passing NilClass To Create & MiniTest Backtrace Cleaner
...that I would always pass params[:foo] and sometimes that was nil and for years that has always worked. Does this sound patch worthy? If so I''ll scrap some time up and see what happens. 2) I noticed that the Rails.backtrace_cleaner was not being used in my tests under 1.9.x since that uses MiniTest. This could have been happening for as long as there has been MiniTest usage since the backtrace cleaner was introduced, I may have never noticed before. Either way I created a plugin last night [1] called MiniBacktrace that is really just a few lines of code [2]. I''d be willing to submit...
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...
2013 Jun 09
2
Minitest mock or stub methods
...ML response with Nokogiri def self.find(name: nil) # Stuff... doc = get_data(some_url) # More stuff... end def get_data(req_url) Nokogiri::XML(open(req_url)) end When writing my tests I don''t want to hit the actual URL but instead load an XML file from disk. I''m using Minitest which has a mocking library, but how do I actually mock (or is it more appropriate to stub?) the method? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To unsubscribe from this group and stop receiving emails from it, send an e...
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 fail...
2019 Jan 17
1
[hivex PATCH] ruby: improve test functions
...0 ++++++++++---------- 4 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ruby/tests/tc_120_rlenvalue.rb b/ruby/tests/tc_120_rlenvalue.rb index 6c03f43..6a2fb72 100644 --- a/ruby/tests/tc_120_rlenvalue.rb +++ b/ruby/tests/tc_120_rlenvalue.rb @@ -37,7 +37,7 @@ class TestRLenValue < MiniTest::Unit::TestCase moderate_value_value = h.node_get_value(moderate_value_node, "33Bytes") r = h.value_data_cell_offset(moderate_value_value) - assert_equal(r[:len], 37) - assert_equal(r[:off], 8712) + assert_equal(37, r[:len]) + assert_equal(8712, r[:off]) end en...
2016 Feb 23
2
[PATCH 1/2] Revert "ruby: Run tests one at a time, instead of in parallel."
It seems the default behaviour of rake is to run tests sequentially, and not in parallel (there are separate gems to achieve that behaviour). Hence just invoke "rake test" to run all the available tests at once. This reverts commit 8f30c3c3f8c063f7c5ff8c6154d881e07a820251. --- ruby/run-ruby-tests | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git
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 (2.7.0) ------------------------------- eldorado@ubuntu:~/work/depot$ gem list *** LOCAL GEMS *** actionmailer (3.1.1) actionpack (3.1...
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 (LoadError) from /Library/Ruby/Gems/1.8/gems/...
2016 Feb 23
0
[PATCH 2/2] ruby: tests: use more asserts instead of manual checks
...ages.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 9c31aa5..b79b984 100644 --- a/ruby/t/tc_100_launch.rb +++ b/ruby/t/tc_100_launch.rb @@ -30,9 +30,7 @@ class TestLoad < MiniTest::Unit::TestCase g.lvcreate("LV2", "VG", 200); lvs = g.lvs() - if lvs != ["/dev/VG/LV1", "/dev/VG/LV2"] - raise "incorrect lvs returned" - end + assert_equal ["/dev/VG/LV1", "/dev/VG/LV2"], lvs g.s...
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
2012 Jun 13
1
newbie question: where to find documentation?
Hello, I am very new to Ruby on Rails and am currently working my way through the Depot tutorial in the *Agile Web Development with Rails* book. I like to have as much info available as possible when I am learning something new and had a question about where to find documentation. In my specific case I was trying to find more info on the assert and assert_equal functions and tried looking
2013 Mar 13
3
Help me about Test-Unit in Ruby on Rails
I''m using RubyMine for developing RoR and i found in RubyMine have Test file.But I read in rubyforge http://test-unit.rubyforge.org/ have Test-Unit for RoR.Could you help me about 2 problem: - how is different between RubyMine Test-Unit and Test-Unit in rubyforge - how can i run Test-Unit with Test-Unit in rubyforge(test-unit github: https://github.com/test-unit/test-unit.git)
2011 Oct 14
3
RSpec 2 not working on Rails 3.1.1
Hey, I updated some Gems and now rspec seems to be broken. The weird thing is it fails because of Test::Unit which doesnt make much sense to me. /Users/username/.rvm/gems/ruby-1.9.2-p290@ror_project/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_ /Users/username/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/test/unit/testcase.rb:9:in
2011 Apr 16
17
Rails 3 Crashing On Windows 7
Hi guys, I have Rails 3 running on Windows 7 with Ruby 1.9.2 Every now and again, my server crashes, and I see the following information in the windows event log: Faulting application name: ruby.exe, version: 1.9.2.180, time stamp: 0x4d5ee5ed Faulting module name: msvcrt-ruby191.dll, version: 1.9.2.180, time stamp: 0x4d5ee5ec Exception code: 0xc0000005 Fault offset: 0x0011a00e Faulting process
2014 Feb 12
61
P2V: Headless support
This introduces support to run P2V without X server. Runtime parameters are specified via kernel command line making it hopefully suitable for automated migration with a little help of PXE boot. Patchset is not squashed and represents dev. history.
2013 Mar 11
7
Installing Ruby 2.0.0-p0 using Rbenv on Ubuntu 12.04.2 LTS
I am having a problem installing Ruby 2.0.0-p0 using rbenv install on Ubuntu 12.04.2 LTS. I have clean version of Ubuntu 12.04.2 LTS running on Virtualbox. I am getting this error and the build is failing. I think I read that the new RubyGems requires https. I have tried rbenv install --with-openssl-dir=/usr/bin, but with no success. The Ruby openssl extension was not compiled. Missing
2013 Jul 23
12
node_aws installation problem
Hi everyone! having a slight problem with the installing the cloud provisioning module [code] http://docs.puppetlabs.com/guides/cloud_pack_getting_started.html [/code] everything worked until I wanted to actually try to fire it up: [code] >puppet node_aws list Error: Could not autoload puppet/face/node_aws/fingerprint: cannot load such file -- guid Error: Could not parse application