similar to: Mocha + Selenium-on-rails loading problem ?

Displaying 20 results from an estimated 400 matches similar to: "Mocha + Selenium-on-rails loading problem ?"

2006 Sep 15
0
Using Selenium with a mock-method on associated Model ???
Hello all, I have a Selenium test calling |open|/sales/approve_activity| The data list gathered for this page requires an external database call to a stored procedure to fill a "work table" that is read for the data on the page (SQL 2000). I have the call wrapped in a single-line method. During my functional test, I mock-disable the stored procedure call, as the "work table"
2006 Sep 13
2
Problem with RSpec and Mocha/Stubba
I''ve recently upgraded to the latest versions of Mocha and RSpec (0.3.2 and 0.6.3 respectively) and I''m no longer able to use Mocha/ Stubba with RSpec. Its actually only Stubba I''m interested in as I use RSpec''s built-in mocking library. I require stubba in my spec file but whenever I try and run my spec it fails with the error: Unintialized constant
2006 Oct 25
5
Mocha, Stubba and RSpec
Hi, I''ve been reading with interest the threads trying to integrate Mocha and Stubba with RSpec. So far, I''ve made the two changes in spec_helper.rb suggested, but discovered another one that neither of the archives mentions: If you use traditional mocking: object = mock or the stub shortcut : object = stub(:method => :result), you run into namespace conflicts with
2007 Apr 11
1
Fwd: [ mocha-Bugs-5892 ] Using a setup method in test_case_class destroys subsequent test cases
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 11-Apr-2007 15:24 Subject: [ mocha-Bugs-5892 ] Using a setup method in test_case_class destroys subsequent test cases To: noreply at rubyforge.org Bugs item #5892, was opened at 2006-09-25 07:49 You can respond by visiting:
2011 Oct 11
5
[PATCH] libxl: reimplement buffer for bootloading and drop data if buffer is full
# HG changeset patch # User Roger Pau Monne <roger.pau@entel.upc.edu> # Date 1318335991 -7200 # Node ID 2fb4bf8c16cd35ddc0bf7ddc7ff8fda4b9678211 # Parent 64f17c7e6c33e5f1c22711ae9cbdcbe191c20062 libxl: reimplement buffer for bootloading and drop data if buffer is full. Implement a buffer for the bootloading process that appends data to the end until it''s full. Drop output from
2006 Nov 15
1
how to handle alert box message in selenium test?
hi guys, how to handle alert box message in selenium test? i want to handle alert box. i want to test(verify text present) the text in alert box & then click ok to alert box. how can i do this.? plz tell me... advance thx. regards, karthick. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are
2006 Sep 08
1
A quick guide to Mocha
Hello :) Having just gone through the (admittedly simple) API of Mocha to learn how it works, I wrote a quick guide (190 lines) to help others get up to speed. I''ve attached it as RDOC and as HTML. It is a first draft - please help me improve by giving feedback ! Contents : Overview - Quick overview of Mocha Unit testing, mock object and stubs - Very quick introduction to mock
2006 Nov 21
5
stubbing in development environment
Hi guys. Quite happy with mocha for testing. It''s been a bit of an eye opener for me, and I expect to begin using it heavily. One other thing I''d like to do is stub out particular class methods in development. Is there a way I can do this with mocha? Jason
2006 Dec 14
3
Stubbing constructiors
This works: class X def X.initialize( stuff ) end end X.initialize("bla") However stubbing it doesn,t: require ''test/unit'' require ''stubba'' class X def X.initialize( stuff ) end end class XTest < Test::Unit::TestCase def test_ X.stubs(:initialize).with("bla")
2006 Dec 14
1
Patch: make rdoc of lib/mocha/object.rb instead of lib/stubba/object.rb
Index: Rakefile =================================================================== --- Rakefile (revision 73) +++ Rakefile (working copy) @@ -23,7 +23,7 @@ task.rdoc_dir = ''doc'' task.template = "html_with_google_analytics" task.options << "--line-numbers" << "--inline-source" -
2007 Mar 04
4
Rails functional testing and Mocha
I''ve always wanted to be able to do stuff like this in my functional tests c = customers(:customer_1) c.expects(:great_customer_service) post :service_customer, :id => c.id This of course fails because inside the rails action a different instance of customer is used. Some of the time setting your expectation/stubbing on Customer.any_instance works, but it''s not
2006 Aug 17
1
expectations on stubs (stubba) or mock methods on existing classes?
Hello, First, thanks for releasing Mocha. As someone who''s been practicing TDD much longer than I''ve been using Rails, one of my biggest complaints has always been the fact that the "Unit" tests are more like intefration tests because of how tightly coupled the domain model is when using ActiveRecord. Stubba looks like it could really help aleviate this problem. The
2006 Sep 25
3
Problem stubbing instances referred to by constants
Hi James, An instance retains its mocha between tests if that instance is pointed to by a constant. The simplest failing test is something like (add as a new file in mocha/test).. #--code-- require File.join(File.dirname(__FILE__), "test_helper") require ''stubba'' class WemStubbaTest < Test::Unit::TestCase Arr = [1, 2, 3] def test_a
2007 Apr 11
0
Fwd: [ mocha-Feature Requests-5856 ] Stubbing of private methods should be allowed
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 11-Apr-2007 15:31 Subject: [ mocha-Feature Requests-5856 ] Stubbing of private methods should be allowed To: noreply at rubyforge.org Feature Requests item #5856, was opened at 2006-09-22 17:03 You can respond by visiting:
2006 Sep 03
1
Slimmed down version for inclusion in Rails?
I''m pushing a major overhaul in testing the Rails codebase. Mocha and stubba make my life easy so that''s what I''m using. The first major patch using them is in RailTies (http://dev.rubyonrails.org/ticket/5970) now. I spoke to DHH today about using it in the other libraries and I think it''ll be ok, but they really want to include as little code as needed. I
2007 Jan 24
0
Mocha 0.4 released
So I finally got round to releasing a new version<http://rubyforge.org/frs/?group_id=1917&release_id=9184>of Mocha <http://mocha.rubyforge.org/>. Much of the functionality has been available for some time if you''ve been using the Rails plugin based on subversion HEAD, but now you can get it in all in a gem (or other package). The most recent changes centre around allowing
2015 May 15
1
[CentOS-announce] CentOS-7 disk images for AArch64 Platforms
The RSEL Project has working builds of EL6 and 7 out for embedded ARM devices like the raspberry pi. http://www.redsleeve.org You need to dig through their wiki four instructions your several devices. Am 14.05.2015 23:46 schrieb "Johnny Hughes" <johnny at centos.org>: > On 05/14/2015 04:19 PM, Always Learning wrote: > > > > On Thu, 2015-05-14 at 13:51 -0700, John R
2006 Aug 15
3
Testing deleting files
In unit or functional test, is there a way to check that a file has been deleted? It seems that running the test does not really execute deleting files, which is good because I don''t want it to actually delete the files. But can I check that the deletion should have been performed in test environment? thanks, - reynard -------------- next part -------------- An HTML attachment was
2006 Nov 10
3
Stubbing Time.now in trunk
I''m a big fan of stubbing Time.now so it returns a known value. I used to be able to use stubba and say: @time_now = Time.parse("Jan 1 2001") Time.stubs(:now).returns(lambda{@time_now}) However, something in trunk broke that. Fine, rspec''s got its own stubbing lib now, so I tried switching to that: @time_now = Time.parse("Jan 1 2001")
2006 Aug 14
14
A mock which extends rather than replaces a class?
While running tests, we would like to instrument some of the classes under test. We still want the classes to do exactly what they currently do, but we would like them to do more when running in the test environment. Clearly we can (and currently do) just extend the objects "on the fly" where necessary, but this is a bit messy - we''d like some centralised way to always