search for: rpsec

Displaying 17 results from an estimated 17 matches for "rpsec".

Did you mean: ipsec
2008 Nov 01
5
Issues after removal of rpsec plugins and gem install
autotest will no longer run my tests after I installed the rpsec gem and removed the plugins. I did install the rspec-rails gem as well. Is anyone else having this issue? -- Posted via http://www.ruby-forum.com/.
2007 Oct 18
4
Feeding the framework ?
Hi there, Is it just me or do many other rspec / rpsec_on_rails users spend more time than they would like feeding the framework ? Don''t get me wrong, I love rpsec, but I seem to spend about 2/3 hours per week hunting down rspec problems. For example, today `rake spec:models` is broken. When I migrate, load fixtures and run `spec -cfs` al...
2007 Dec 04
3
svn: Connection closed unexpectedly when getting trunk
Is anyone else getting this message? With rails 2.0 pre-releases it looks like you also have to be working with the latest version of rpsec. $ ruby script/plugin install svn://rubyforge.org/var/svn/rspec/trunk/rspec svn: Connection closed unexpectedly The above is what I get when I try to install the trunk version. Is there something that I am missing? Thanks -- Posted via http://www.ruby-forum.com/.
2012 Dec 01
6
Why does 'extend ActiveSupport::Concern' cause `undefined method 'recycle!'`?
...some_method end end end # code in my rails app where engine is implemented class SomeController include MyEngine::SomeController def app_some_method end # code that''s available by including the Rails Engine code # def engine_some_method # end end But, this breaks my rpsec controller tests because of an undefined "recycle" method. 12) Qe::Admin::QuestionPagesController POST reorder Failure/Error: xhr :post, :create, NoMethodError: undefined method `recycle!'' for #<Qe::Admin::QuestionPagesController:0x007f80aa1c7528> #...
2006 Dec 01
1
Specifying lib classes in a Rails app
The rpsec-on-rails app defines a great structure for specifying all of the constituent parts of a rails app. Does anybody have any advice for where to put tests for lib code that you include to support your app, and how to fit it in to the rake:spec rake task. Cheers Steve
2007 Feb 28
2
Fixture name not available as class variable in spec
Hi there, I can''t seem to access the fixture name as a class variable from my specs. I have to set the variable in the spec setup. ... [fixtures] my_fixture: id: 1 ... [rpsec] @my_fixture.id.should == 1 ... [error] You have a nil object when you didn''t expect it! The error occurred while evaluating nil.id ... [my setup] RSpec-0.7.5.1 (r1395) - BDD for Ruby Rails 1.2.2 Latest rspec_on_rails plugin Is this this a bug or a feature ? Keith
2007 Sep 05
3
Rspec Caveman questions.
...riting my first series of specs. My initial impressions are "Verbose, but understandable. Helpful and intuitive, but so much to digest." I want to congratulate the folks who are dedicating a chunk of their lives to writing this, and ask 2 caveman questions My first is "Why lambda in rpsec"? It doesn''t strike me as "reads like english" or "easily understandable." I understand it''s place in ruby (um, kind of :), but my thinking is: lambda { do_something_risky }.should raise_error would be more understandable (and fun!) written as: running...
2007 Sep 05
6
Caveman Questions
...riting my first series of specs. My initial impressions are "Verbose, but understandable. Helpful and intuitive, but so much to digest." I want to congratulate the folks who are dedicating a chunk of their lives to writing this, and ask 2 caveman questions My first is "Why lambda in rpsec"? It doesn''t strike me as "reads like english" or "easily understandable." I understand it''s place in ruby (um, kind of :), but my thinking is: lambda { do_something_risky }.should raise_error would be more understandable (and fun!) written as: running...
2007 Feb 11
1
Specing Rails Views
...r ''logged_in?'' isn''t defined for <#Class....> My rails app gets ''logged_in?'' via ''include AuthenticatedSystem'' in my application controller. I understand that views are tested in isolation from their controller counterpart in rpsec, so ''include AuthenticatedSystem'' isn''t called and thus ''logged_in?'' isn''t available for the test/spec. I found a couple of work arounds. 1) add a method logged_in? into the application_helper.rb or <controller>_helper.rb (where <c...
2012 Jan 15
1
How to mock out a WEBrick::HTTPServer?
...ntent. I want to test a/ methods in the class in isolation b/ test that if a HTTP request sent in generates a HTTP request out (suppose should be just a method to test) c/ and that the HTTP response given to the proxy with body is passed back from the client. Problems I''m running into 1. rpsec creates new instants of my proxy each test, such that multi HTTP servers are running (see rspec implicate-subject) 1.1 This is due to my #initialise creating the HTTPServer, so is that bad code in the init? 1.2 I did that so that starting is neater "Proxy.new.start" 2. I want to mock out...
2007 Dec 14
5
How do I mock params?
Here is the code within the controller: Line 69: @photo = @member.build_photo(params[:photo]) unless params[:photo][:uploaded_data].blank? I got a little ahead of myself and wrote the code, and now have a bunch of errors telling me that: ------- 6) NoMethodError in ''Spec::Rails::Example::ControllerExampleGroup MembersController handling PUT /members/1 should find the member
2006 Oct 24
5
Radrails and RSpec
Hi all, Does anyone know how to get radrails to use RSpec specs instead of tests? Cheers --~--~---------~--~----~------------~-------~--~----~ 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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to
2007 Jul 16
4
RSpec - concerns about mocking
I''m getting into RSpec more after getting the awesome Peepcode screencast about it. So far I love it, but coming form Test::Unit with Rails, I have some concerns about the recommendation to mock models and database calls in controller and view specs. Lets say you have a method on your User model called User.find_activated, and you have models specs for it. Then in your controller specs
2008 Jan 18
5
How do I pass form values from POST controller specs?
Hi there I just started my first Merb app and I''m running into some weird things in Specs. When I do: describe "create action" do it "should create a new project" do project_params = {:name => ''bekkunin''} Project.should_receive(:create).with(project_params) controller, action = post(''/projects'', :project
2007 Aug 27
7
Foreign key constraints, fixtures, and rake task
I''ve got a spec that loads a fixture in the "before" block. This works fine running scripts/spec, but when I run rake spec instead, I get: ActiveRecord::StatementInvalid in ''User in fixture :quentin with an IM service but no IM name should be invalid'' Mysql::Error: Cannot delete or update a parent row: a foreign key constraint fails
2006 Nov 30
41
TDD killing my joy of Rails
I''ve been working through the book ''Beginning Ruby on Rails E-Commerce'' which is very heavy on Test Driven Development. As in, you have to write tests for scaffolding methods and validations and crap like that. And then they fail. And you KNOW its the test not the method. So you spend 2x the time writing a test that has to be adapted when requirements change. You
2007 Nov 22
11
Initial run of RSpec 1.0.8 on MS-WinXPproSP2
Rails 1.2.5 Ruby 1.8.6 Rake 0.7.3 RSpec 1.0.8 PostgreSQL 8.2.5 I am experiencing a problem with the "rake spec spec" task on an initial trial of rspec. After creating the rails app I installed rspec and rspec_on_rails in the vendor\plugins subdirectory from svn. I then used ruby script\generate rspec_model product. I next manually created the database instances depot_development and