similar to: [Stories] Login and subdomain

Displaying 20 results from an estimated 10000 matches similar to: "[Stories] Login and subdomain"

2008 Jan 13
2
should_receive twice and arguments
Hi all, I have a method calling Klass.create! two times with different arguments (this happens in a class reponsable for reading in a csv file) I want to test those like this: in one test: Klass.should_receive(:create!).with(:name => "foo").once in another: Klass.should_receive(:create!).with(:name => "foo2").once This doesn''t work because the
2007 Dec 23
1
multiple scenarios problem
Hi all I just recently started to use rspec and I''m having a problem using multple scenarios in one story. These are the two scenarios, trying to test my implemenation of the new http authentication in rails 2: Scenario "user has to authenticate" do Given "an anonymous user" do end When "visiting", "working_page" do |page|
2008 Mar 19
2
Stub / Mock - A little guidance?
Hi there, I''m still trying to wrap my head around when to use a stub and a mock. If I understand this right, I should be using a ''mock'' when imitating an object, but not its behavior. I should be using a stub when I want to imitate the behavior of an object. Does that sound about right? With that said, I''m struggling a little trying to spec out this instance
2007 Apr 06
3
Mocking Authentication
Is anyone using Restful Authentication? If so, how are you mocking the login for your controllers? I''m having trouble with it and would love an example of someone''s login. I''m sure I''m missing something simple. Michael railsconsulting.com
2004 Apr 14
2
samba on distro...
Hi, I have to setup a samba-server (and a bit intranet) for a school. There are about 200 client-pc's for about 1000 people. Now I wondered which OS would be best for us. Should we pay for a distro, or would a free distro be enough? And which distro should we use? Please keep in mind that schools like quality and don't like big bills! ;-) thanks in advance for any answer, Ivo Dancet
2004 Feb 12
3
hardware question
I recently asked this question, but I didn't get an answer on this part of my question: What hardware would be able to do this with ease: I must install a samba server as PDC for my school. The server would authenticate users using openldap (on the same server). And if possible, I would also run an intranet on it (apache, php, mysql). There would be about a hundred (maybe 150 later on)
2007 Oct 26
3
Specing with Subdomains as Account Keys
How do you go about implementing and rspecing subdomains as account keys? I''m sure that this must be an issues for others as well. So I have an app using subdomains as account keys. The Application Controller sets up @current_company in a before filter. Everything is done within the context of the @current_company. After reading about Demeter''s Revenge
2008 Mar 20
1
stories with selenium and the db
Hi all Tonight I wanted to test out selenium in a story to test some ajax stuff on a page. After struggling for an hour or two with disappearing database objects I found the solution in a blog post by Kerry Buckley. with the comment included it reads: # Don''t add an ActiveRecordSafetyListener, or it''ll roll stuff back class Spec::Story::Runner::ScenarioRunner def
2007 Oct 25
1
Mocking/Stubbing help with subdomain as account key
My app uses account_location to set up subdomains as account keys. In my controllers, all my model operations are scoped through the @current_person object. The question is: How do I test this with RSpec''s mocking and stubbing? Basically, I need to test that @current_person.things is getting the find message and returning @thing. I''ve tried stubbing and mocking
2007 Feb 20
2
rails 1.2.1, locomotive and backgroundrb
Hi I just tried to move my project to rails 1.2.1 on my locomotive development setup. It seems that backgroundrb is not willing to start up anymore. If I switch locomotive back to 1.1.6, everthing is fine. This is the error I get while attempting to start backgroundrb: /Applications/Locomotive2/Bundles/standardRailsJan2007.locobundle/
2004 Feb 05
2
mandatory profiles?
I would like to setup a samba PDC with mandatory profiles for my school. I know that I can easily use them for XP (centralized) and that for Win 98 I have to put them in the user accounts. Now my question: do I have to put a profile in the user account each time a new user is made? Or is there a simple way of doing this. (off course I would link it to one profile, but this way I still have to
2008 Jan 30
2
Stubbing controller methods vs model methods
I had an error that I couldn''t figure out, then when writing up a question for the forum I figured it out. The thing is I don''t understand why the change that was made works and why what existed before didn''t. Here is the initial post when I had the error: ---------------------------------- In the controllers/application.rb file I have a method that finds the account
2007 Nov 29
5
Webrat 0.1.0 released - Ruby Acceptance Testing for Web applications
Hey guys, We developed this plugin while writing my first real set of RSpec stories. It''s still missing a lot of functionality, but it''s useful to us as is, so I''m shipping 0.1.0. (Patches welcome. :) ) Code is available at: http://svn.eastmedia.net/public/plugins/webrat/ What do you think? -Bryan Here''s the README:
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")
2008 Feb 02
6
Suspended start of task not suspended
Hi I thought this should suspend the task by 1 minute, but it starts immediately: MiddleMan.ask_work( :worker => :bar_worker, :worker_method => :test_method, :trigger_args => { :start => (Time.now + 1.minute)}) Is the start argument not allowed in the new backgroundrb (mine is at rev HEAD (=314))? What can I do about this? I really need to suspend starting the task as I want
2008 Jan 28
2
Could this controller test be made simpler?
In a create controller method I am testing the else clause that occurs when the model is unable to be saved. Sounds simple enough, but because model is created before the save and the form has to be re-filled I now have to stub a model and all the attributes. Since the error messages are displayed I also have to stub some methods within the model that allow the error messages to be displayed
2007 Oct 05
7
Easy AR association stubbing
I''ve added a method to the mock class that makes it pretty easy to stub associations in rails. I''ve been using it for awhile and it seems to cut down on a lot of setup code for the controller and model specs that use associations. #before @person = mock_model(Person) posts = mock(''post_proxy'') posts.stub!(:build).and_return(mock_model(Post, :save => true))
2009 Nov 10
10
Un-recognised routes that do exist, using namespaces & subdomain checking
I''m getting really cheesed off with RSpec not matching some of my routes when controller testing when I have subdomain checking (courtesy of subdomain-fu) on namespaces. These routes appear in the rake routes output, and work fine via HTTP requests . The really annoying thing is it''s working fine for routes that aren''t at the root of the namespace. E.g. say I have
2007 Dec 05
1
RC2 troubles
Hi I can''t get backgroundrb working. I get the following error in backgroundrb_server.log: backgroundrb/framework/core.rb:117:in `bind'': Address family not supported by protocol family - bind(2) (Errno::EAFNOSUPPORT) Seems to be a problem with my Mac (Leopard) and my ruby install (1.8.6 that came with the OS) according to some emails I found with google. Did anyone
2007 Nov 30
2
which version of backgroundrb to use
Hello I''ve been using backgroundrb for a while now and love it. I''ve notices some recent updates and am confused as to which branch/tag is what. What''s the difference between these: new_core/ version010/ version099/ version10/ and trunk, and where does "0.2.2" fit in? Thanks! -- Peter T. Brown peter at wagglelabs.com http://wagglelabs.com