similar to: Rspec test for correct file search

Displaying 20 results from an estimated 80000 matches similar to: "Rspec test for correct file search"

2010 Mar 13
1
Testing file upload (Sinatra, RSpec, Rack-Test)
Hi. I have a simple application and I want to add a file upload functionality. How can I write a spec? Here''s my try. # directory structure app: - controller.rb - controller.spec.rb - files: [] - fixtures: [test_file.png] # controller.spec.rb require ''rack/test'' require ''controller'' module MyHelpers def app Sinatra::Application end end
2011 Mar 10
2
Trying to test flash messaging with rspec
Hello every one, So my this rspec test fails: [code] it "should have a welcome message" do post :create, :user => @attr response.flash[:success].should eql("Welcome new user!") end [/code] However when I create a new user the flash message does display just as I had wanted it to. The controller has this in it: [code] def create @user =
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
2007 Aug 07
1
Rspec controller test
Great Hi to everybody! I am currently working on a project which tests the controllers using rspec. I came across some methods in the controller which do not generate any actions at all. However, they still need testing! Some of these methods do require parameters. I am wondering how I can pass the test cases as the parameters to these targeted methods in the controller spec?? Below is a simple
2008 Sep 24
1
TextMate and RSpec
I have to persist some data in the database to test the interactions between two of my models. One model has a serial number attribute that is unique, so it must be entered once and only once. rake spec deletes all the data, allowing my tests to pass. . Running rspec under TextMate produces a fail, however, because the data in tables remain. This is somewhat inconsistent, too. Running it
2018 Jul 14
0
Clamd issues on Centos 6.10
Am 15.07.2018 um 00:13 schrieb Jay Hart: > ClamAV update process started at Sat Jul 14 15:10:48 2018 > Using IPv6 aware code > Querying current.cvd.clamav.net > TTL: 1232 > Software version from DNS: 0.100.1 > WARNING: Your ClamAV installation is OUTDATED! > WARNING: Local version: 0.100.0 Recommended version: 0.100.1 > DON'T PANIC!
2018 Jul 15
0
Clamd issues on Centos 6.10
Libraries: do they look ok???? [root at centos clamav]# ldd $(which freshclam) linux-gate.so.1 => (0x00529000) libclamav.so.7 => /usr/lib/libclamav.so.7 (0x00bc5000) libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00124000) libbz2.so.1 => /lib/libbz2.so.1 (0x04906000) libssl.so.10 => /usr/lib/libssl.so.10 (0x047fa000) libcrypto.so.10 => /usr/lib/libcrypto.so.10 (0x03d52000)
2007 Oct 12
1
Edge rspec - running Test::Unit tests
With rspec 1.0.8 I can run Test::Unit tests and rspec tests using: rake default and all tests and specs run. With edge rspec the Test::Unit tests return with the message: [list of tests] Finished in 4.5e-05 seconds 0 examples, 0 failures How can I get Test::Unit and rspec to happily co-exist again? Thanks, Alvin
2008 Jul 03
0
Testing HAML in helper rspec
Thought I''d post this under its own heading so others can find it. Thanks to David for the pointers to solve this. Here is the incantation needed to use HAML 2.0 under RSpec 1.1.5 (Needs the .5 for a fix) # application_helper_spec.rb under spec/helpers ... before :each do helper.extend Haml helper.extend Haml::Helpers helper.send :init_haml_helpers end it
2010 Oct 03
2
rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released!
rspec-1.3.1.rc and rspec-rails-1.3.3.rc are released! These are release candidate gems for updates 1.x series, including some bug fixes and deprecation warnings for functionality that will be removed in rspec-2. Barring unexpected complications, I''ll release final versions of these gems within the next week. Cheers, David
2007 Jun 05
0
Fwd: testing - test/spec and rspec
are you guys aware of this?? :) Begin forwarded message: > From: topfunky <topfunkycorporation at gmail.com> > Date: June 4, 2007 8:35:24 PM EDT > To: PeepCode <peepcode at googlegroups.com> > Subject: Re: testing - test/spec and rspec > Reply-To: peepcode at googlegroups.com > > > On 5/28/07, Neil <neilrahilly at gmail.com> wrote: >> Just
2007 Aug 12
1
Test::Unit to RSpec Converter
Hey, just posting in case this is of interest. I just recently wrote a Rails plugin to convert Rails Test::Unit cases to RSpec. http://www.davidjrice.co.uk/articles/2007/8/12/ruby-on-rails-plugin- test-unit-to-rspec-converter it''s not going to work 100% in every case, but it''s really helped me convert old tests to the lovely RSpec :) Best, Dave --- David Rice
2008 Mar 12
1
Testing helper methods in rspec
This is perhaps a naive question, but what is the recommended manner of testing a helper method in rspec? I have created a simple string manipulation function and I want to write some tests for it. It it were a script then I would just add if __FILE__ == $0 and add the tests below that but I do not feel that this is the best way to handle a rails helper. The code (I said it was simple) :
2006 Dec 17
1
Rspec/Ruby to test software written in other languages?
Is anyone here using Rspec and Ruby to test software written in other languages? I''m about to start an R language project, and may also be doing some work in another language (I''m not sure which one yet, but it''s one of the ones that''s part of the Axiom symbolic math package). I''d dearly love a test framework that can handle all three languages,
2006 Nov 25
2
Comparison between RSpec and test/unit
I''m curious, Christian Neukirchen has released test/unit[1] that seems to mirror much of RSpec, but built on Test::Unit, so in some ways less brittle from a Rails-integration perspective, and also allowing you to mix the two together as appropriate. So, has anyone made an informed comparison? I''m new enough that I don''t really know the finer points yet. The syntax is
2010 Nov 29
0
[TDD] [Rails] - Rspec test for application_helper.rb fails when trying to access application_controller method.
In a method named logo in my application helper, I reference an application controller method (current_account) that has been marked as a helper method with the following syntax: helper_method :current_account When I test out the setup in the browser (without rspec), rails is happy with this setup. However, when I run the spec, the spec won''t pass and gives me the following error:
2010 Oct 12
0
Rails 3 and rspec 2 turning off transactional fixtures per test
I am having trouble turning off transactional fixtures per test in Rails 3 with rspec 2. I did this successfully with rspec 1.3.1 and rails 2. rspec version is 2.0.0.rc Below is my stack overflow question which provides more details: http://stackoverflow.com/questions/3907815/rails-3-and-rspec-2-turn-off-transactional-fixtures-for-individual-tests Any help is appreciated. Thanks!
2008 Mar 04
3
rspec vs. test::more
Hey all, you HAVE to read this blog post: http://blog.jrock.us/articles/RSpec%20vs.%20Test::More.pod#comments My favorite parts are: 1) ... some rspec code ... > For the sake of comparison lets translate this directly into perl: ... some perl code ... 2) >First, notice that the rspec-version isn''t actually ruby code. It''s not any real language. For the sake of
2008 Oct 12
0
How to test with RSpec a Rails plugin using “link_to” and “current_page?”
I''m writing a Rails plugin that builds up a menu in a view. I''m using *link`_`to* to build the link and *current_page?* to set class="active" on the current page. I''ve *include*d *ActionView::Helpers::UrlHelper* so I can use *link`_`to*. To get *current`_`page?* working in the view, I''ve had to inherit the current class (apparently ActionView::Base)
2007 Aug 22
1
Can Rspec do module spec? What if module uses test data?
Dear fellows: I am currently working on writing specs on some ruby modules(e.g. myModule). At first I try to use script/generate to generate rspec_module, but it failed. :-( Later I manually created a file (e.g. named myModule_spec.rb) and put the ''require ....spec_helper.rb'' as the first line of code followed by ''describe'' block. Luckily, it seemed to